public static UnsignedByte valueOf(final String value) throws NumberFormatException { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<8)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<8) +")."); } return valueOf((byte)intVal); }
public static UnsignedByte valueOf(final String value) throws NumberFormatException { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<8)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<8) +")."); } return valueOf((byte)intVal); }
public static UnsignedByte valueOf(final String value) throws NumberFormatException { int intVal = Integer.parseInt(value); if(intVal < 0 || intVal >= (1<<8)) { throw new NumberFormatException("Value \""+value+"\" lies outside the range [" + 0 + "-" + (1<<8) +")."); } return valueOf((byte)intVal); }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedByte(UnsignedByte.valueOf(b.get())); } }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedByte(UnsignedByte.valueOf(b.get())); } }
public UnsignedByte getValue() { return UnsignedByte.valueOf((byte)ordinal()); }
@Override public void parse(ByteBuffer b, Data data) { data.putUnsignedByte(UnsignedByte.valueOf(b.get())); } }
public UnsignedByte getValue() { return UnsignedByte.valueOf((byte)ordinal()); }
public UnsignedByte getValue() { return UnsignedByte.valueOf((byte)ordinal()); }
public UnsignedByte getValue() { return UnsignedByte.valueOf((byte)ordinal()); }
@Override public org.apache.activemq.artemis.api.core.Message setPriority(byte priority) { if (header == null) { header = new Header(); } header.setPriority(UnsignedByte.valueOf(priority)); return this; }
public UnsignedByte readValue() { return UnsignedByte.valueOf(getDecoder().readRawByte()); } }
public UnsignedByte readValue() { return UnsignedByte.valueOf(getDecoder().readRawByte()); } }
public void setPriority(int priority) { if (priority == DEFAULT_PRIORITY) { setPriority(null); } else { byte scaled = (byte) priority; if (priority < 0) { scaled = 0; } else if (priority > 9) { scaled = 9; } setPriority(UnsignedByte.valueOf(scaled)); } }
@Override public void setPriority(short priority) { if (_header == null) { if (priority == DEFAULT_PRIORITY) { return; } _header = new Header(); } _header.setPriority(UnsignedByte.valueOf((byte) priority)); }
@Override public org.apache.activemq.artemis.api.core.Message setPriority(byte priority) { getHeader().setPriority(UnsignedByte.valueOf(priority)); return this; }
public UnsignedByte readValue() { return UnsignedByte.valueOf(getDecoder().readRawByte()); } }
public UnsignedByte readValue() { return UnsignedByte.valueOf(getDecoder().readRawByte()); } }
@Override public void setPriority(short priority) { if (_header == null) { if (priority == DEFAULT_PRIORITY) { return; } _header = new Header(); } _header.setPriority(UnsignedByte.valueOf((byte) priority)); }
@Override public void setPriority(short priority) { if (_header == null) { if (priority == DEFAULT_PRIORITY) { return; } _header = new Header(); } _header.setPriority(UnsignedByte.valueOf((byte) priority)); }