play.data.parsing
类 MultipartStream.ItemInputStream

java.lang.Object
  继承者 java.io.InputStream
      继承者 play.data.parsing.MultipartStream.ItemInputStream
所有已实现的接口:
java.io.Closeable
包容类:
MultipartStream

public class MultipartStream.ItemInputStream
extends java.io.InputStream
implements Closeable

An InputStream for reading an items contents.


方法摘要
 int available()
          Returns the number of bytes, which are currently available, without blocking.
 void close()
          Closes the input stream.
 long getBytesRead()
          Returns the number of bytes, which have been read by the stream.
 boolean isClosed()
          Returns, whether the stream is closed.
 int read()
          Returns the next byte in the stream.
 int read(byte[] b, int off, int len)
          Reads bytes into the given buffer.
 long skip(long bytes)
          Skips the given number of bytes.
 
从类 java.io.InputStream 继承的方法
mark, markSupported, read, reset
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

getBytesRead

public long getBytesRead()
Returns the number of bytes, which have been read by the stream.

返回:
Number of bytes, which have been read so far.

available

public int available()
              throws java.io.IOException
Returns the number of bytes, which are currently available, without blocking.

覆盖:
java.io.InputStream 中的 available
返回:
Number of bytes in the buffer.
抛出:
java.io.IOException - An I/O error occurs.

read

public int read()
         throws java.io.IOException
Returns the next byte in the stream.

指定者:
java.io.InputStream 中的 read
返回:
The next byte in the stream, as a non-negative integer, or -1 for EOF.
抛出:
java.io.IOException - An I/O error occurred.

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads bytes into the given buffer.

覆盖:
java.io.InputStream 中的 read
参数:
b - The destination buffer, where to write to.
off - Offset of the first byte in the buffer.
len - Maximum number of bytes to read.
返回:
Number of bytes, which have been actually read, or -1 for EOF.
抛出:
java.io.IOException - An I/O error occurred.

close

public void close()
           throws java.io.IOException
Closes the input stream.

指定者:
接口 java.io.Closeable 中的 close
覆盖:
java.io.InputStream 中的 close
抛出:
java.io.IOException - An I/O error occurred.

skip

public long skip(long bytes)
          throws java.io.IOException
Skips the given number of bytes.

覆盖:
java.io.InputStream 中的 skip
参数:
bytes - Number of bytes to skip.
返回:
The number of bytes, which have actually been skipped.
抛出:
java.io.IOException - An I/O error occurred.

isClosed

public boolean isClosed()
Returns, whether the stream is closed.

返回:
True, if the stream is closed, otherwise false.


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly