Java examples for java.lang:int Format
read Little Endian Short
//package com.java2s; import java.io.DataInput; import java.io.IOException; public class Main { public static short readLittleEndianShort(DataInput in) throws IOException { int low = in.readUnsignedByte() & 0xff; int high = in.readUnsignedByte(); return (short) (high << 8 | low); }/*from www . jav a 2 s . co m*/ }