public static short readUByte(ByteBuffer buffer){
  byte b=buffer.get();
  return (short)(b & 0xff);
}

public static short readUByte ( ByteBuffer buffer ) { byte b = buffer . get ( ) ; return ( short ) ( b & 0xff ) ; }
get one unsigned byte as short type
