@Test(expected = CodecException.class) public void setBytesTooBigForFixedSize() { final AsnOctetStringBasedObjectCodec codec = createCodec(new AsnSizeConstraint(1, 1)); final byte[] bytes = new byte[2]; try { codec.setBytes(bytes); } catch (CodecException e) { assertThat(e.getMessage()).isEqualTo("Invalid octet string length. Expected < 1, got 2"); throw e; } }
public final void setBytes(byte[] bytes) { Objects.requireNonNull(bytes); validateSize(bytes); this.bytes = bytes; this.onValueChangedEvent(); }
AsnOctetStringBasedObjectCodec extends AsnPrimitiveCodec<T> { public final void setBytes(byte[] bytes) { Objects.requireNonNull(bytes); validateSize(bytes); this.bytes = bytes; this.onValueChangedEvent(); } }
AsnOctetStringBasedObjectCodec extends AsnPrimitiveCodec<T> { public final void setBytes(byte[] bytes) { Objects.requireNonNull(bytes); validateSize(bytes); this.bytes = bytes; this.onValueChangedEvent(); } AsnOctetStringBasedObjectCodec(AsnSizeConstraint sizeConstraintInOctets);  AsnOctetStringBasedObjectCodec(int fixedSizeConstraint);  AsnOctetStringBasedObjectCodec(int minSize, int maxSize); }
AsnOctetStringBasedObjectCodec extends AsnPrimitiveCodec<T> { public final void setBytes(byte[] bytes) { Objects.requireNonNull(bytes); validateSize(bytes); this.bytes = bytes; this.onValueChangedEvent(); } AsnOctetStringBasedObjectCodec(AsnSizeConstraint sizeConstraintInOctets);  AsnOctetStringBasedObjectCodec(int fixedSizeConstraint);  AsnOctetStringBasedObjectCodec(int minSize, int maxSize); final byte[] getBytes(); final void setBytes(byte[] bytes); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
AsnOctetStringBasedObjectCodec extends AsnPrimitiveCodec<T> { public final void setBytes(byte[] bytes) { Objects.requireNonNull(bytes); validateSize(bytes); this.bytes = bytes; this.onValueChangedEvent(); } AsnOctetStringBasedObjectCodec(AsnSizeConstraint sizeConstraintInOctets);  AsnOctetStringBasedObjectCodec(int fixedSizeConstraint);  AsnOctetStringBasedObjectCodec(int minSize, int maxSize); final byte[] getBytes(); final void setBytes(byte[] bytes); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }