Search in sources :

Example 1 with Reader

use of com.amazon.ion.impl.IonBinary.Reader in project ion-java by amzn.

the class _Private_Utils method loadStreamBytes.

public static byte[] loadStreamBytes(InputStream in) throws IOException {
    BufferManager buffer = new BufferManager(in);
    Reader bufReader = buffer.reader();
    bufReader.sync();
    bufReader.setPosition(0);
    byte[] bytes = bufReader.getBytes();
    return bytes;
}
Also used : Reader(com.amazon.ion.impl.IonBinary.Reader) IonReader(com.amazon.ion.IonReader) BufferManager(com.amazon.ion.impl.IonBinary.BufferManager)

Aggregations

IonReader (com.amazon.ion.IonReader)1 BufferManager (com.amazon.ion.impl.IonBinary.BufferManager)1 Reader (com.amazon.ion.impl.IonBinary.Reader)1