Class MultipartReader

java.lang.Object
org.aoju.bus.image.galaxy.media.MultipartReader

public class MultipartReader extends Object
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

  • Constructor Details

    • MultipartReader

      public MultipartReader(InputStream input, byte[] boundary)
      Parameters:
      input - 多部分交换的nputStream
      boundary - 用于分隔多部分流的各个部分的标记
    • MultipartReader

      public MultipartReader(InputStream input, byte[] boundary, int bufSize)
      Parameters:
      input - 多部分交换的InputStream
      boundary - 用于分隔多部分流的各个部分的标记
      bufSize - 缓冲区的大小(以字节为单位)默认值为4096
  • Method Details

    • compareArrays

      protected static boolean compareArrays(byte[] a, byte[] b, int count)
    • getHeaderEncoding

      public String getHeaderEncoding()
    • setHeaderEncoding

      public void setHeaderEncoding(String encoding)
    • readByte

      public byte readByte() throws IOException
      Throws:
      IOException
    • readBoundary

      public boolean readBoundary() throws IOException
      Throws:
      IOException
    • readHeaders

      public String readHeaders() throws IOException
      Throws:
      IOException
    • skipFirstBoundary

      public boolean skipFirstBoundary() throws IOException
      Throws:
      IOException
    • newPartInputStream

      public MultipartReader.PartInputStream newPartInputStream()
    • discardDataBeforeDelimiter

      protected void discardDataBeforeDelimiter() throws IOException
      Throws:
      IOException
    • findFirstBoundaryCharacter

      protected int findFirstBoundaryCharacter(int start)
    • findStartingBoundaryPosition

      protected int findStartingBoundaryPosition()