Skip to content

class MultipartBoundary

cangjie
public class MultipartBoundary

功能:表示 multipart 读取过程中使用的边界信息。

成员概览

成员功能
init(String)使用边界字符串创建实例。
prop boundaryBytes返回当前边界字节序列。
prop finalBoundaryLength返回最终边界的总长度。
func expectLeadingCrlf()标记后续边界需要带前导 CRLF。
func beforeFirstBoundary()检查当前是否仍位于首个边界之前。

init(String)

cangjie
public init(value: String)

功能:使用边界字符串创建实例。

参数:

  • value: String - multipart 边界字符串。

prop boundaryBytes

cangjie
public prop boundaryBytes: Array<Byte>

功能:返回当前边界字节序列。

类型:Array<Byte>

prop finalBoundaryLength

cangjie
public prop finalBoundaryLength: Int64

功能:返回最终边界的总长度。

类型:Int64

func expectLeadingCrlf()

cangjie
public func expectLeadingCrlf(): Unit

功能:标记后续边界需要带前导 CRLF。

返回值:

  • Unit

func beforeFirstBoundary()

cangjie
public func beforeFirstBoundary(): Bool

功能:检查当前是否仍位于首个边界之前。

返回值:

  • Bool - 如果尚未经过首个边界则返回 true,否则返回 false。