/** * See the general contract of the <code>readFully</code> * method of <code>DataInput</code>. * <p> * Bytes * for this operation are read from the contained * input stream. * * @param b the buffer into which the data is read. * @exception EOFException if this input stream reaches the end before * reading all the bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in */ public final void readFully(byte b[]) throws IOException { readFully(b, 0, b.length); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next four bytes of this input stream, interpreted as a * <code>float</code>. * @exception EOFException if this input stream reaches the end before * reading four bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Float#intBitsToFloat(int) */ public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next eight bytes of this input stream, interpreted as a * <code>double</code>. * @exception EOFException if this input stream reaches the end before * reading eight bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Double#longBitsToDouble(long) */ public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); }
/** * {@inheritDoc} * @see parquet.column.values.ValuesReader#initFromPage(byte[], int) */ @Override public void initFromPage(int valueCount, byte[] in, int offset) throws IOException { if (DEBUG) LOG.debug("init from page at offset "+ offset + " for length " + (in.length - offset)); this.in = new LittleEndianDataInputStream(new ByteArrayInputStream(in, offset, in.length - offset)); }
@Override public float readFloat() { try { return in.readFloat(); } catch (IOException e) { throw new ParquetDecodingException("could not read float", e); } } }
@Override public double readDouble() { try { return in.readDouble(); } catch (IOException e) { throw new ParquetDecodingException("could not read double", e); } }
@Override public void skip() { try { in.skipBytes(4); } catch (IOException e) { throw new ParquetDecodingException("could not skip int", e); } }
@Override public int readByte() { try { return in.read(); } catch (IOException e) { throw new ParquetDecodingException("could not read byte", e); } }
/** * {@inheritDoc} * @see parquet.column.primitive.PrimitiveColumnReader#initFromPage(byte[], int) */ @Override public int initFromPage(long valueCount, byte[] in, int offset) throws IOException { if (DEBUG) LOG.debug("init from page at offset "+ offset + " for length " + (in.length - offset)); this.in = new LittleEndianDataInputStream(new ByteArrayInputStream(in, offset, in.length - offset)); return in.length; }
@Override public float readFloat() { try { return in.readFloat(); } catch (IOException e) { throw new ParquetDecodingException("could not read float", e); } }
@Override public double readDouble() { try { return in.readDouble(); } catch (IOException e) { throw new ParquetDecodingException("could not read double", e); } } }
@Override public void skip() { try { in.skipBytes(8); } catch (IOException e) { throw new ParquetDecodingException("could not skip long", e); } }
/** * See the general contract of the <code>readFully</code> * method of <code>DataInput</code>. * <p> * Bytes * for this operation are read from the contained * input stream. * * @param b the buffer into which the data is read. * @exception EOFException if this input stream reaches the end before * reading all the bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in */ public final void readFully(byte b[]) throws IOException { readFully(b, 0, b.length); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next four bytes of this input stream, interpreted as a * <code>float</code>. * @exception EOFException if this input stream reaches the end before * reading four bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Float#intBitsToFloat(int) */ public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next eight bytes of this input stream, interpreted as a * <code>double</code>. * @exception EOFException if this input stream reaches the end before * reading eight bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Double#longBitsToDouble(long) */ public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); }
@Override public void skip() { try { in.skipBytes(8); } catch (IOException e) { throw new ParquetDecodingException("could not skip double", e); } }
/** * See the general contract of the <code>readFully</code> * method of <code>DataInput</code>. * <p> * Bytes * for this operation are read from the contained * input stream. * * @param b the buffer into which the data is read. * @exception EOFException if this input stream reaches the end before * reading all the bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.io.FilterInputStream#in */ public final void readFully(byte b[]) throws IOException { readFully(b, 0, b.length); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next four bytes of this input stream, interpreted as a * <code>float</code>. * @exception EOFException if this input stream reaches the end before * reading four bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Float#intBitsToFloat(int) */ public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
/** * Bytes * for this operation are read from the contained * input stream. * * @return the next eight bytes of this input stream, interpreted as a * <code>double</code>. * @exception EOFException if this input stream reaches the end before * reading eight bytes. * @exception IOException the stream has been closed and the contained * input stream does not support reading after close, or * another I/O error occurs. * @see java.lang.Double#longBitsToDouble(long) */ public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); }