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 - 多部分交换的nputStreamboundary - 用于分隔多部分流的各个部分的标记public MultipartReader(InputStream input, byte[] boundary, int bufSize)
input - 多部分交换的InputStreamboundary - 用于分隔多部分流的各个部分的标记bufSize - 缓冲区的大小(以字节为单位)默认值为4096protected 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 © 2021. All rights reserved.