@Override public void write( final PaAttributeValueErrorInformationInvalidParam data, final ByteBuffer buffer) throws SerializationException { NotNull.check("Value cannot be null.", data); NotNull.check("Buffer cannot be null.", buffer); PaAttributeValueErrorInformationInvalidParam aValue = data; try { /* message header copy 64 bit(s) */ /* copy version 8 bit(s) */ buffer.writeUnsignedByte(data.getMessageHeader().getVersion()); /* copy reserved 24 bit(s) */ buffer.write(data.getMessageHeader().getReserved()); /* copy identifier 32 bit(s) */ buffer.writeUnsignedInt(data.getMessageHeader().getIdentifier()); /* offset 32 bit(s) */ buffer.writeUnsignedInt(aValue.getOffset()); } catch (BufferOverflowException e) { throw new SerializationException( "Buffer capacity " + buffer.capacity() + " to short.", e, false, Long.toString(buffer.capacity())); } }
@Override public TnccContentHandler createHandler( final ImcHandler imHandler, final TnccHandler tnccHandler, final TnccsValidationExceptionHandler exceptionHandler) { NotNull.check("Handler arguments cannot be null.", imHandler, tnccHandler, exceptionHandler); TnccContentHandler contentHandler = new DefaultTnccContentHandler(imHandler, tnccHandler, exceptionHandler); return contentHandler; }