public final class ReadBytesUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
read(File file,
@NonNull byte[] buffer)
Reads all bytes from the file to the specified buffer.
|
static int |
read(File file,
byte[] buffer,
int length)
Reads all bytes from the file to the specified buffer.
|
static int |
read(@NonNull File file,
byte[] buffer,
int offset,
int length)
Reads the bytes from the file to the specified buffer.
|
static int |
read(File file,
@NonNull ByteBuffer buffer)
Reads the bytes from the file to the specified buffer.
|
static int |
read(@NonNull File file,
ByteBuffer buffer,
int length)
Reads the bytes from the file to the specified buffer.
|
static int |
read(File file,
@NonNull Bytes buffer)
Reads the bytes from the file to the specified buffer.
|
static int |
read(@NonNull File file,
Bytes buffer,
int length)
Reads the bytes from the file to the specified buffer.
|
static Bytes |
read(@NonNull InputStream inputStream)
Reads all bytes from the stream till the end of the stream.
|
static int |
read(InputStream inputStream,
@NonNull byte[] buffer)
Reads all bytes from the stream to the specified buffer.
|
static int |
read(InputStream inputStream,
byte[] buffer,
int length)
Reads the bytes from the stream to the specified buffer.
|
static int |
read(@NonNull InputStream inputStream,
@NonNull byte[] bytes,
int offset,
int length)
Reads the bytes from the stream to the specified buffer.
|
static int |
read(InputStream inputStream,
@NonNull ByteBuffer buffer)
Reads all bytes from the stream to the specified buffer.
|
static int |
read(@NonNull InputStream inputStream,
@NonNull ByteBuffer buffer,
int length)
Reads the bytes from the stream to the specified buffer.
|
static int |
read(InputStream inputStream,
@NonNull Bytes buffer)
Reads all bytes from the stream to the specified buffer.
|
static int |
read(@NonNull InputStream inputStream,
@NonNull Bytes buffer,
int length)
Reads the bytes from the stream to the specified buffer.
|
static Bytes |
read(@NonNull InputStream inputStream,
int length)
Reads all bytes from the stream till the end of the stream or
requested length reached.
|
static int |
read(Path path,
@NonNull byte[] buffer)
Reads all bytes from the file to the specified buffer.
|
static int |
read(Path path,
byte[] buffer,
int length)
Reads all bytes from the file to the specified buffer.
|
static int |
read(@NonNull Path path,
byte[] buffer,
int offset,
int length)
Reads the bytes from the file to the specified buffer.
|
static int |
read(Path path,
@NonNull ByteBuffer buffer)
Reads the bytes from the file to the specified buffer.
|
static int |
read(@NonNull Path path,
ByteBuffer buffer,
int length)
Reads the bytes from the file to the specified buffer.
|
static int |
read(Path path,
@NonNull Bytes buffer)
Reads the bytes from the file to the specified buffer.
|
static int |
read(@NonNull Path path,
Bytes buffer,
int length)
Reads the bytes from the file to the specified buffer.
|
static int |
read(ReadableByteChannel channel,
@NonNull byte[] buffer)
Reads all bytes from the channel to the specified buffer.
|
static int |
read(ReadableByteChannel channel,
byte[] buffer,
int length)
Reads all bytes from the channel to the specified buffer.
|
static int |
read(@NonNull ReadableByteChannel channel,
@NonNull byte[] bytes,
int offset,
int length)
Reads the bytes from the stream to the specified buffer.
|
static int |
read(ReadableByteChannel channel,
@NonNull ByteBuffer buffer)
Reads all bytes from the channel to the specified buffer.
|
static int |
read(@NonNull ReadableByteChannel channel,
@NonNull ByteBuffer buffer,
int length)
Reads all bytes from the channel to the specified buffer.
|
static int |
read(ReadableByteChannel channel,
@NonNull Bytes buffer)
Reads all bytes from the channel to the specified buffer.
|
static int |
read(@NonNull ReadableByteChannel channel,
@NonNull Bytes buffer,
int length)
Reads all bytes from the channel to the specified buffer.
|
public static Bytes read(@NonNull @NonNull InputStream inputStream)
inputStream - the input data streamBytes instance.public static Bytes read(@NonNull @NonNull InputStream inputStream, int length)
inputStream - the input data streamlength - the maximum number of bytes will be readedBytes instance.public static int read(InputStream inputStream, @NonNull @NonNull byte[] buffer)
inputStream - the input data streambuffer - the buffer into which the data is readpublic static int read(InputStream inputStream, @NonNull @NonNull Bytes buffer)
inputStream - the input data streambuffer - the buffer into which the data is readpublic static int read(InputStream inputStream, @NonNull @NonNull ByteBuffer buffer)
inputStream - the input data streambuffer - the buffer into which the data is readpublic static int read(InputStream inputStream, byte[] buffer, int length)
inputStream - the input data streambuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull InputStream inputStream,
@NonNull
@NonNull Bytes buffer,
int length)
inputStream - the input data streambuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull InputStream inputStream,
@NonNull
@NonNull ByteBuffer buffer,
int length)
inputStream - the input data streambuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull InputStream inputStream,
@NonNull
@NonNull byte[] bytes,
int offset,
int length)
inputStream - the input data streambytes - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenlength - the maximum number of bytes to readpublic static int read(ReadableByteChannel channel, @NonNull @NonNull byte[] buffer)
channel - the input data channelbuffer - the buffer into which the data is readpublic static int read(ReadableByteChannel channel, byte[] buffer, int length)
channel - the input data channelbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull ReadableByteChannel channel,
@NonNull
@NonNull byte[] bytes,
int offset,
int length)
channel - the input data channelbytes - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenlength - the maximum number of bytes to readpublic static int read(ReadableByteChannel channel, @NonNull @NonNull ByteBuffer buffer)
channel - the input data channelbuffer - the buffer into which the data is readpublic static int read(@NonNull
@NonNull ReadableByteChannel channel,
@NonNull
@NonNull ByteBuffer buffer,
int length)
channel - the input data channelbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(ReadableByteChannel channel, @NonNull @NonNull Bytes buffer)
channel - the input data channelbuffer - the buffer into which the data is readpublic static int read(@NonNull
@NonNull ReadableByteChannel channel,
@NonNull
@NonNull Bytes buffer,
int length)
channel - the input data channelbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(File file, @NonNull @NonNull byte[] buffer)
file - the file to readbuffer - the buffer into which the data is readpublic static int read(Path path, @NonNull @NonNull byte[] buffer)
path - the file to readbuffer - the buffer into which the data is readpublic static int read(File file, byte[] buffer, int length)
file - the file to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(Path path, byte[] buffer, int length)
path - the path to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull File file,
byte[] buffer,
int offset,
int length)
file - the file to readbuffer - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull Path path,
byte[] buffer,
int offset,
int length)
path - the file to readbuffer - the buffer into which the data is readoffset - the start offset in the buffer at which the data is writtenlength - the maximum number of bytes to readpublic static int read(File file, @NonNull @NonNull Bytes buffer)
file - the file to readbuffer - the buffer into which the data is readpublic static int read(Path path, @NonNull @NonNull Bytes buffer)
path - the file to readbuffer - the buffer into which the data is readpublic static int read(@NonNull
@NonNull File file,
Bytes buffer,
int length)
file - the file to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull Path path,
Bytes buffer,
int length)
path - the file to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(File file, @NonNull @NonNull ByteBuffer buffer)
file - the file to readbuffer - the buffer into which the data is readpublic static int read(Path path, @NonNull @NonNull ByteBuffer buffer)
path - the file to readbuffer - the buffer into which the data is readpublic static int read(@NonNull
@NonNull File file,
ByteBuffer buffer,
int length)
file - the file to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readpublic static int read(@NonNull
@NonNull Path path,
ByteBuffer buffer,
int length)
path - the file to readbuffer - the buffer into which the data is readlength - the maximum number of bytes to readCopyright © 2019–2020 Appulse. All rights reserved.