Code example for InputStream

Methods: read

0
 
		if ((offset + length) > buffer.length) {
			length = buffer.length - offset;
		} 
 
		return inputStream.read(buffer, offset, length);
	} 
 
	public static int write(OutputStream outputStream, BufferProxy bufferProxy, int offset, int length) throws IOException
	{ 
		byte[] buffer = bufferProxy.getBuffer();
 
		if ((offset + length) > buffer.length) {
			length = buffer.length - offset;
		} 
 
		outputStream.write(buffer, offset, length);
		outputStream.flush();
 
		return length;
Stop searching for code, let great code find you!  Add Codota to your java IDE