public static UnsignedShort valueOf(final String value) { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<16)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<16) +")."); } return valueOf((short)intVal); } }
public static UnsignedShort valueOf(final String value) { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<16)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<16) +")."); } return valueOf((short)intVal); } }
public static UnsignedShort valueOf(final String value) { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<16)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<16) +")."); } return valueOf((short)intVal); } }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedShort(UnsignedShort.valueOf(b.getShort())); } }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedShort(UnsignedShort.valueOf(b.getShort())); } }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedShort(UnsignedShort.valueOf(b.getShort())); } }
public UnsignedShort readValue() { return UnsignedShort.valueOf(getDecoder().readRawShort()); } }
public UnsignedShort readValue() { return UnsignedShort.valueOf(getDecoder().readRawShort()); } }
public UnsignedShort readValue() { return UnsignedShort.valueOf(getDecoder().readRawShort()); } }
public UnsignedShort readValue() { return UnsignedShort.valueOf(getDecoder().readRawShort()); } }
@Override public UnsignedShort readUnsignedShort(final UnsignedShort defaultVal) { byte encodingCode = _buffer.get(); switch (encodingCode) { case EncodingCodes.USHORT: return UnsignedShort.valueOf(readRawShort()); case EncodingCodes.NULL: return defaultVal; default: throw new DecodeException("Expected UnsignedShort type but found encoding: " + encodingCode); } }
open.setChannelMax(UnsignedShort.valueOf((short) _channelMax));
open.setChannelMax(UnsignedShort.valueOf((short) _channelMax));
begin.setRemoteChannel(UnsignedShort.valueOf((short) transportSession.getRemoteChannel()));
begin.setRemoteChannel(UnsignedShort.valueOf((short) transportSession.getRemoteChannel()));
begin.setRemoteChannel(UnsignedShort.valueOf((short) transportSession.getRemoteChannel()));
begin.setRemoteChannel(UnsignedShort.valueOf((short) transportSession.getRemoteChannel()));