+
+ pw.println();
+ pw.flush();
+ pw.println("^@");
+ pw.println("^@");
+ pw.println("^@");
+ pw.flush();
+ try { Thread.sleep(3000); } catch (Exception e) { }
+
+ pw.println("GK\"IMG\"");
+ pw.println("GK\"IMG\"");
+ pw.println();
+ pw.flush();
+ try { Thread.sleep(1000); } catch (Exception e) { }
+ /*
+ pw.println("GI");
+ pw.flush();
+ */
+ int[] data = new int[104 * 104];
+ for(int i=0; i<104*104; i++) data[i] = 1;
+ for(int i=0; i<104; i++) data[i*104+i] = 0;
+ for(int i=0; i<104; i++) data[i*104+(104-i)] = 0;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PCX.dump(104, 104, data, new DataOutputStream(baos));
+ byte[] outb = baos.toByteArray();
+ int len = outb.length;
+ pw.println("GM\"IMG\""+len);
+ pw.flush();
+ DataOutputStream dout = new DataOutputStream(out);
+ for(int i=0; i<len; i++) {
+ System.out.println("wrote " + i + "/"+outb.length);
+ dout.writeByte(outb[i]);
+ dout.flush();
+ }
+ dout.flush();
+
+ pw.println();
+ pw.println("GI");
+ pw.flush();
+
+ try { Thread.sleep(2000); } catch (Exception e) { }
+
+ pw.println();