use of org.apache.hyracks.dataflow.common.data.marshalling.ByteArraySerializerDeserializer in project asterixdb by apache.
the class ByteArrayHexParserFactory method createValueParser.
@Override
public IValueParser createValueParser() {
return new IValueParser() {
HexParser parser = new HexParser();
ByteArraySerializerDeserializer serializer = ByteArraySerializerDeserializer.INSTANCE;
@Override
public void parse(char[] input, int start, int length, DataOutput out) throws HyracksDataException {
try {
parser.generateByteArrayFromHexString(input, start, length);
serializer.serialize(parser.getByteArray(), 0, parser.getLength(), out);
} catch (IOException e) {
throw new HyracksDataException(e);
}
}
};
}
Aggregations