public static class HTTPServer.ChunkedInputStream extends HTTPServer.LimitedInputStream
ChunkedInputStream decodes an InputStream whose data has the
"chunked" transfer encoding applied to it, providing the underlying data.| 限定符和类型 | 字段和说明 |
|---|---|
protected HTTPServer.Headers |
headers |
protected boolean |
initialized |
limit, prematureEndExceptionin| 构造器和说明 |
|---|
ChunkedInputStream(InputStream in,
HTTPServer.Headers headers)
Constructs a ChunkedInputStream with the given underlying stream, and
a headers container to which the stream's trailing headers will be
added.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected long |
initChunk()
Initializes the next chunk.
|
protected static long |
parseChunkSize(String line)
Parses a chunk-size line.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
available, close, markSupported, skipmark, read, resetprotected HTTPServer.Headers headers
protected boolean initialized
public ChunkedInputStream(InputStream in, HTTPServer.Headers headers)
in - the underlying "chunked"-encoded input streamheaders - the headers container to which the stream's trailing
headers will be added, or null if they are to be discardedNullPointerException - if the given stream is nullpublic int read()
throws IOException
read 在类中 HTTPServer.LimitedInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 HTTPServer.LimitedInputStreamIOExceptionprotected long initChunk()
throws IOException
IOException - if an IO error occurs or the stream is corruptprotected static long parseChunkSize(String line) throws IllegalArgumentException
line - the chunk-size line to parseIllegalArgumentException - if the chunk-size line is invalidCopyright © 2021. All rights reserved.