//System.out.println("input = " + input);
if(input == 0) {
// write
byte[] buf=new byte[SIZE];
shared_buffer.put(buf, 0, buf.length);
shared_buffer.rewind();
shared_buffer.put((byte)1).rewind();
count++;
if(count % PRINT == 0)
System.out.println("wrote " + count);
}