public void convertToRawBytes(byte[] rawBytes, int offset, ConvTable ccsidConverter) throws SQLException { AS400ByteArray typeConverter = new AS400ByteArray(length_); BinaryConverter.unsignedShortToByteArray(length_, rawBytes, offset); typeConverter.toBytes(value_, rawBytes, offset + 2); }
public void convertFromRawBytes(byte[] rawBytes, int offset, ConvTable ccsidConverter) throws SQLException { length_ = BinaryConverter.byteArrayToUnsignedShort(rawBytes, offset); AS400ByteArray typeConverter = new AS400ByteArray(length_); value_ = (byte[]) typeConverter.toObject(rawBytes, offset + 2); }