code: private void readNextBlob(InterceptedStream<InputStream> stream) {
  
          // Read blob from stream if it exists
          try {
  
              // Read raw data from input stream
              byte[] blob = new byte[6048];
              int length = stream.getStream().read(blob);
  
              // End stream if no more data
              if (length == -1) {
  
                  // Close stream, send end if the stream is still valid
                  if (closeInterceptedStream(stream))
                      sendEnd(stream.getIndex());
  
                  return;
  
              }
  
              // Inject corresponding "blob" instruction
              sendBlob(stream.getIndex(), Arrays.copyOf(blob, length));
  
          }
  
          // Terminate stream if it cannot be read
          catch (IOException e) {
  
              logger.debug("Unable to read data of intercepted input stream.", e);
  
              // Close stream, send end if the stream is still valid
              if (closeInterceptedStream(stream))
                  sendEnd(stream.getIndex());
  
          }
  
      }
docs: Reads the next chunk of data from the InputStream associated with an
  intercepted stream, sending that data as a "blob" instruction over the
  GuacamoleTunnel associated with this filter. If the end of the
  InputStream is reached, an "end" instruction will automatically be sent.
  
  @param stream
  The stream from which the next chunk of data should be read.