Java com.google.common.io ByteStreams fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.io ByteStreams fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.io ByteStreams.

The text is from its open source code.

Method

longcopy(InputStream from, OutputStream to)
Copies all bytes from the input stream to the output stream.
longcopy(ReadableByteChannel from, WritableByteChannel to)
Copies all bytes from the readable channel to the writable channel.
InputStreamlimit(InputStream in, long limit)
Wraps a InputStream , limiting the number of bytes which can be read.
ByteArrayDataInputnewDataInput(byte[] bytes)
Returns a new ByteArrayDataInput instance to read from the bytes array from the beginning.
ByteArrayDataInputnewDataInput(ByteArrayInputStream byteArrayInputStream)
Returns a new ByteArrayDataInput instance to read from the given ByteArrayInputStream .
ByteArrayDataInputnewDataInput(byte[] bytes, int start)
Returns a new ByteArrayDataInput instance to read from the bytes array, starting at the given position.
ByteArrayDataOutputnewDataOutput()
Returns a new ByteArrayDataOutput instance with a default size.
ByteArrayDataOutputnewDataOutput(int size)
Returns a new ByteArrayDataOutput instance sized to hold size bytes before resizing.
ByteArrayDataOutputnewDataOutput(ByteArrayOutputStream byteArrayOutputSteam)
Returns a new ByteArrayDataOutput instance which writes to the given ByteArrayOutputStream .
OutputStreamnullOutputStream()
Returns an OutputStream that simply discards written bytes.
intread(InputStream in, byte[] b, int off, int len)
Reads some bytes from an input stream and stores them into the buffer array b .
TreadBytes(InputStream input, ByteProcessor processor)
Process the bytes of the given input stream using the given processor.
voidreadFully(InputStream in, byte[] b)
Attempts to read enough bytes from the stream to fill the given byte array, with the same behavior as DataInput#readFully(byte[]) .
voidreadFully(InputStream in, byte[] b, int off, int len)
Attempts to read len bytes from the stream into the given array starting at off , with the same behavior as DataInput#readFully(byte[],int,int) .
voidskipFully(InputStream in, long n)
Discards n bytes of data from the input stream.
byte[]toByteArray(InputStream in)
Reads all bytes from an input stream into a byte array.