Code example for ByteBuffer

Methods: getShort

0
	} 
 
	@Override 
	public short readShort() throws IOException { 
		try { 
			return buf.getShort();
		} catch (BufferUnderflowException e) {
			throw (EOFException)new EOFException().initCause(e);
		} 
	} 
 
 
	@Override 
	public int readUnsignedByte() throws IOException { 
		try { 
			return buf.get() & 0xFF;
		} catch (BufferUnderflowException e) {
			throw (EOFException)new EOFException().initCause(e);
		} 
	}