コード例 #1
0
 /**
  * Read up to desired bytes of data into the internal buffer.
  *
  * @return the number of bytes available, or -1 if the connection is closed.
  */
 public int readAvailable(int desired) {
   int available = read.tryRead(desired);
   return available;
 }
コード例 #2
0
 public void close() {
   read.close();
 }
コード例 #3
0
 /**
  * See {@link NIOReadStream#readAllAvailable()}.
  *
  * @see NIOReadStream#readAllAvailable()
  */
 public boolean readAllAvailable() {
   return read.readAllAvailable();
 }
コード例 #4
0
 public int available() {
   return read.dataAvailable();
 }