List of usage examples for org.apache.hadoop.typedbytes TypedBytesInput readString
public String readString() throws IOException
Type.STRING
code. From source file:fm.last.pigtail.storage.TypedBytesSequenceFileLoader.java
License:Apache License
@Override public String bytesToCharArray(byte[] b) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(b); DataInputStream dis = new DataInputStream(bais); TypedBytesInput tbin = TypedBytesInput.get(dis); if (tbin.readType() != org.apache.hadoop.typedbytes.Type.STRING) { throw new FrontendException("Type code does not correspond to string."); }// w w w. j a v a 2 s . c o m return tbin.readString(); }