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