Java tutorial
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { public static OutputStream outStream; public static void WakeUpPritner() { byte[] b = { '\0', '\0', '\0' }; printMessage(b, 3); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } byte[] b1 = { 27, 64 }; printMessage(b1, 2); } private static void printMessage(byte[] b, int len) { try { if (outStream != null) outStream.write(b, 0, len); } catch (IOException e) { e.printStackTrace(); } } }