readUntilEnd
public static int readUntilEnd(java.io.InputStream in,
byte[] buffer,
int offset,
int length)
throws java.io.IOException
Reads from the stream until either the length number of bytes is read, or the stream ends. Note that neither case
throws an exception.
- Parameters:
in - The stream to read from.
buffer - Buffer to write the data that is read from the stream.
offset - Offset in the buffer to start writing from.
length - Maximum number of bytes to read from the stream.
- Returns:
- The number of bytes read from the stream.
- Throws:
java.io.IOException - On read error.