public class MultipartReader extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
MultipartReader.PartInputStream |
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_PART_MAX_SIZE |
| Constructor and Description |
|---|
MultipartReader(InputStream input,
byte[] boundary) |
MultipartReader(InputStream input,
byte[] boundary,
int bufSize) |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
compareArrays(byte[] a,
byte[] b,
int count) |
protected void |
discardDataBeforeDelimiter() |
protected int |
findFirstBoundaryCharacter(int start) |
protected int |
findStartingBoundaryPosition() |
String |
getHeaderEncoding() |
MultipartReader.PartInputStream |
newPartInputStream() |
boolean |
readBoundary() |
byte |
readByte() |
String |
readHeaders() |
void |
setHeaderEncoding(String encoding) |
boolean |
skipFirstBoundary() |
public static final int HEADER_PART_MAX_SIZE
public MultipartReader(InputStream input, byte[] boundary)
input - the InputStream of a multipart exchange.boundary - the mark to delimit the parts of a multipart stream.public MultipartReader(InputStream input, byte[] boundary, int bufSize)
input - the InputStream of a multipart exchange.boundary - the mark to delimit the parts of a multipart stream.bufSize - the size of the buffer in bytes. Default is 4096.protected static boolean compareArrays(byte[] a,
byte[] b,
int count)
public String getHeaderEncoding()
public void setHeaderEncoding(String encoding)
public byte readByte()
throws IOException
IOExceptionpublic boolean readBoundary()
throws IOException
IOExceptionpublic String readHeaders() throws IOException
IOExceptionpublic boolean skipFirstBoundary()
throws IOException
IOExceptionpublic MultipartReader.PartInputStream newPartInputStream()
protected void discardDataBeforeDelimiter()
throws IOException
IOExceptionprotected int findFirstBoundaryCharacter(int start)
protected int findStartingBoundaryPosition()
Copyright © 2020. All rights reserved.