@Test public void testSetValue() { short id = 41; byte[] contentTypeBytes = BitUtil.splitShortToBytes(id); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); outputStream.write(contentTypeBytes[1]); CoAPOptionHeader h = new CoAPOptionHeader(CoAPOptionName.CONTENT_FORMAT, outputStream.toByteArray()); byte[] test = outputStream.toByteArray(); org.junit.Assert.assertArrayEquals(h.getValue(), test); id = 43; contentTypeBytes = BitUtil.splitShortToBytes(id); outputStream = new ByteArrayOutputStream(); outputStream.write(contentTypeBytes[1]); test = outputStream.toByteArray(); org.junit.Assert.assertNotSame(test, h.getValue()); }
public void setValue(byte[] value) { this.value = value; }
CoAPOptionHeader implements Comparable<CoAPOptionHeader> { public void setValue(byte[] value) { this.value = value; } }
CoAPOptionHeader implements Comparable<CoAPOptionHeader> { public void setValue(byte[] value) { this.value = value; } CoAPOptionHeader(CoAPOptionName name, byte[] value);  CoAPOptionHeader(CoAPOptionName name);  CoAPOptionHeader(String optionName, byte[] value); }
CoAPOptionHeader implements Comparable<CoAPOptionHeader> { public void setValue(byte[] value) { this.value = value; } CoAPOptionHeader(CoAPOptionName name, byte[] value);  CoAPOptionHeader(CoAPOptionName name);  CoAPOptionHeader(String optionName, byte[] value); CoAPOptionName getOptionName(); int getOptionNumber(); int getLength(); byte[] getValue(); void setValue(byte[] value); @Override int compareTo(CoAPOptionHeader header); @Override int hashCode(); @Override boolean equals(Object obj); }
CoAPOptionHeader implements Comparable<CoAPOptionHeader> { public void setValue(byte[] value) { this.value = value; } CoAPOptionHeader(CoAPOptionName name, byte[] value);  CoAPOptionHeader(CoAPOptionName name);  CoAPOptionHeader(String optionName, byte[] value); CoAPOptionName getOptionName(); int getOptionNumber(); int getLength(); byte[] getValue(); void setValue(byte[] value); @Override int compareTo(CoAPOptionHeader header); @Override int hashCode(); @Override boolean equals(Object obj);  }