flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
/**
	 * Auxiliary method to read the length of an upcoming data chunk from an
	 * input stream.
	 *
	 * @param inputStream
	 *        the input stream to read the length from
	 * @return the length of the upcoming data chunk in bytes
	 * @throws IOException
	 *         thrown if an I/O error occurs while reading from the input
	 *         stream
	 */
Auxiliary method to read the length of an upcoming data chunk from an
input stream.

@param inputStream
the input stream to read the length from
@return the length of the upcoming data chunk in bytes
@throws IOException
thrown if an I/O error occurs while reading from the input
stream
Auxiliary method to read the length of an upcoming data chunk from an input stream . @param inputStream the input stream to read the length from @return the length of the upcoming data chunk in bytes @throws IOException thrown if an I / O error occurs while reading from the input stream
static int readLength(InputStream inputStream) throws IOException {
		byte[] buf = new byte[4];
		int bytesRead = 0;
		while (bytesRead < 4) {
			final int read = inputStream.read(buf, bytesRead, 4 - bytesRead);
			if (read < 0) {
				throw new EOFException("Read an incomplete length");
			}
			bytesRead += read;
		}
		bytesRead = buf[0] & 0xff;
		bytesRead |= (buf[1] & 0xff) << 8;
		bytesRead |= (buf[2] & 0xff) << 16;
		bytesRead |= (buf[3] & 0xff) << 24;
		return bytesRead;
	}
static int readLength ( InputStream inputStream ) throws IOException { byte [ ] buf = new byte [ 4 ] ; int bytesRead = 0 ; while ( bytesRead < 4 ) { final int read = inputStream . read ( buf , bytesRead , 4 - bytesRead ) ; if ( read < 0 ) { throw new EOFException ( "Read an incomplete length" ) ; } bytesRead += read ; } bytesRead = buf [ 0 ] & 0xff ; bytesRead |= ( buf [ 1 ] & 0xff ) << 8 ; bytesRead |= ( buf [ 2 ] & 0xff ) << 16 ; bytesRead |= ( buf [ 3 ] & 0xff ) << 24 ; return bytesRead ; }
Auxiliary method to read the length of an upcoming data chunk from an
 input stream.
Auxiliary method to read the length of an upcoming data chunk from an input stream .