public void writeShort(int v) {int b1 = (v >>>  8) & 0xFF;int b0 = (v) & 0xFF;try {out.write(b0);out.write(b1);} catch (IOException e) {throw new RuntimeException(e);}}
public void WriteShort(int v){int b1 = (v >> 8) & 0xFF;int b0 = (v >> 0) & 0xFF;try{out1.WriteByte((byte)b0);out1.WriteByte((byte)b1);}catch (IOException e){throw new RuntimeException(e);}}