public static class HTTPServer.MultipartInputStream extends FilterInputStream
MultipartInputStream decodes an InputStream whose data has
a "multipart/*" content type (see RFC 2046), providing the underlying
data of its various parts.
The InputStream methods (e.g. read()) relate only to
the current part, and the nextPart() method advances to the
beginning of the next part.
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
boundary |
protected byte[] |
buf |
protected int |
end |
protected int |
head |
protected int |
len |
protected int |
state |
protected int |
tail |
in| 限定符 | 构造器和说明 |
|---|---|
protected |
MultipartInputStream(InputStream in,
byte[] boundary)
Constructs a MultipartInputStream with the given underlying stream.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
available() |
protected boolean |
fill()
Fills the buffer with more data from the underlying stream.
|
protected void |
findBoundary()
Finds the first (potential) boundary within the buffer's remaining data.
|
boolean |
markSupported() |
boolean |
nextPart()
Advances the stream position to the beginning of the next part.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long len) |
close, mark, read, resetprotected final byte[] boundary
protected final byte[] buf
protected int head
protected int tail
protected int end
protected int len
protected int state
protected MultipartInputStream(InputStream in, byte[] boundary)
in - the underlying multipart streamboundary - the multipart boundaryNullPointerException - if the given stream or boundary is nullIllegalArgumentException - if the given boundary's size is not
between 1 and 70public int read()
throws IOException
read 在类中 FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 FilterInputStreamIOExceptionpublic long skip(long len)
throws IOException
skip 在类中 FilterInputStreamIOExceptionpublic int available()
throws IOException
available 在类中 FilterInputStreamIOExceptionpublic boolean markSupported()
markSupported 在类中 FilterInputStreampublic boolean nextPart()
throws IOException
IOException - if an error occursprotected boolean fill()
throws IOException
IOException - if an error occurs or the input format is invalidprotected void findBoundary()
throws IOException
IOException - if an error occurs or the input format is invalidCopyright © 2021. All rights reserved.