short readShortLittleEndian( ) { // get 2 bytes, unsigned 0..255 int low = readByte() & 0xff; int high = readByte() & 0xff; // combine into a signed short. return(short)( high << 8 | low ); // rem in JDK 1.5+ you can say: // return Short.reverseBytes( s ); }