Package org.aoju.bus.image.galaxy.media
Class MultipartReader
java.lang.Object
org.aoju.bus.image.galaxy.media.MultipartReader
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultipartReader(InputStream input, byte[] boundary) MultipartReader(InputStream input, byte[] boundary, int bufSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancompareArrays(byte[] a, byte[] b, int count) protected voidprotected intfindFirstBoundaryCharacter(int start) protected intbooleanbytereadByte()voidsetHeaderEncoding(String encoding) boolean
-
Field Details
-
HEADER_PART_MAX_SIZE
public static final int HEADER_PART_MAX_SIZE- See Also:
-
-
Constructor Details
-
MultipartReader
- Parameters:
input- 多部分交换的nputStreamboundary- 用于分隔多部分流的各个部分的标记
-
MultipartReader
- Parameters:
input- 多部分交换的InputStreamboundary- 用于分隔多部分流的各个部分的标记bufSize- 缓冲区的大小(以字节为单位)默认值为4096
-
-
Method Details
-
compareArrays
protected static boolean compareArrays(byte[] a, byte[] b, int count) -
getHeaderEncoding
-
setHeaderEncoding
-
readByte
- Throws:
IOException
-
readBoundary
- Throws:
IOException
-
readHeaders
- Throws:
IOException
-
skipFirstBoundary
- Throws:
IOException
-
newPartInputStream
-
discardDataBeforeDelimiter
- Throws:
IOException
-
findFirstBoundaryCharacter
protected int findFirstBoundaryCharacter(int start) -
findStartingBoundaryPosition
protected int findStartingBoundaryPosition()
-