flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
/**
	 * Auxiliary method to read a particular number of bytes from an input stream. This method blocks until the
	 * requested number of bytes have been read from the stream. If the stream cannot offer enough data, an
	 * {@link EOFException} is thrown.
	 *
	 * @param inputStream The input stream to read the data from.
	 * @param buf The buffer to store the read data.
	 * @param off The offset inside the buffer.
	 * @param len The number of bytes to read from the stream.
	 * @param type The name of the type, to throw a good error message in case of not enough data.
	 * @throws IOException
	 *         Thrown if I/O error occurs while reading from the stream or the stream cannot offer enough data.
	 */
Auxiliary method to read a particular number of bytes from an input stream. This method blocks until the
requested number of bytes have been read from the stream. If the stream cannot offer enough data, an
EOFException is thrown.

@param inputStream The input stream to read the data from.
@param buf The buffer to store the read data.
@param off The offset inside the buffer.
@param len The number of bytes to read from the stream.
@param type The name of the type, to throw a good error message in case of not enough data.
@throws IOException
Thrown if I/O error occurs while reading from the stream or the stream cannot offer enough data.
Auxiliary method to read a particular number of bytes from an input stream . This method blocks until the requested number of bytes have been read from the stream . If the stream cannot offer enough data an EOFException is thrown . @param inputStream The input stream to read the data from . @param buf The buffer to store the read data . @param off The offset inside the buffer . @param len The number of bytes to read from the stream . @param type The name of the type to throw a good error message in case of not enough data . @throws IOException Thrown if I / O error occurs while reading from the stream or the stream cannot offer enough data .
static void readFully(InputStream inputStream, byte[] buf, int off, int len, String type) throws IOException {
		int bytesRead = 0;
		while (bytesRead < len) {
			final int read = inputStream.read(buf, off + bytesRead, len
					- bytesRead);
			if (read < 0) {
				throw new EOFException("Received an incomplete " + type);
			}
			bytesRead += read;
		}
	}
static void readFully ( InputStream inputStream , byte [ ] buf , int off , int len , String type ) throws IOException { int bytesRead = 0 ; while ( bytesRead < len ) { final int read = inputStream . read ( buf , off + bytesRead , len - bytesRead ) ; if ( read < 0 ) { throw new EOFException ( "Received an incomplete " + type ) ; } bytesRead += read ; } }
Auxiliary method to read a particular number of bytes from an input stream.
Auxiliary method to read a particular number of bytes from an input stream .