List of usage examples for org.apache.hadoop.typedbytes TypedBytesInput readDouble
public double readDouble() throws IOException
Type.DOUBLE
code. From source file:fm.last.pigtail.storage.TypedBytesSequenceFileLoader.java
License:Apache License
@Override public Double bytesToDouble(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.DOUBLE) { throw new FrontendException("Type code does not correspond to double."); }/* w w w . j av a2 s .c o m*/ return tbin.readDouble(); }