public static void writeSwappedShort(OutputStream output,short value) throws IOException {
  output.write((byte)((value >> 0) & 0xff));
  output.write((byte)((value >> 8) & 0xff));
}

public static void writeSwappedShort ( OutputStream output , short value ) throws IOException { output . write ( ( byte ) ( ( value > > 0 ) & 0xff ) ) ; output . write ( ( byte ) ( ( value > > 8 ) & 0xff ) ) ; }
writes a " short " value to an outputstream . the value is converted to the opposed endian system while writing .
