Class MultiHelper
- java.lang.Object
-
- org.logdoc.fairhttp.service.tools.MultiHelper
-
public class MultiHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMultiHelper.MultiHandler
-
Field Summary
Fields Modifier and Type Field Description static byte[]boundaryPrefixstatic byteCRstatic byteDASHstatic byte[]fieldSeparatorstatic byte[]headerSeparatorstatic byteLFstatic byte[]streamEnd
-
Constructor Summary
Constructors Constructor Description MultiHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]getBoundary(MimeType contentType)static StringgetFieldName(String pContentDisposition)static StringgetFieldName(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers)static StringgetFileName(String pContentDisposition)static StringgetFileName(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers)static org.logdoc.fairhttp.service.tools.MultiHelper.PartHeadersgetParsedHeaders(String headerPart)static booleannextBoundary(byte[] boundary, InputStream stream, OutputStream sump)static intparseEndOfLine(String headerPart, int idx)static voidparseHeaderLine(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers, String header)static voidprocess(MultiHelper.MultiHandler handler, MimeType contentType, byte[] input)static voidprocessBoundary(MultiHelper.MultiHandler handler, byte[] boundary, byte[] input)static StringreadHeaders(InputStream stream)static voidstripPart(byte[] bytes, org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers, MultiHelper.MultiHandler handler)
-
-
-
Field Detail
-
CR
public static final byte CR
- See Also:
- Constant Field Values
-
LF
public static final byte LF
- See Also:
- Constant Field Values
-
DASH
public static final byte DASH
- See Also:
- Constant Field Values
-
headerSeparator
public static final byte[] headerSeparator
-
fieldSeparator
public static final byte[] fieldSeparator
-
streamEnd
public static final byte[] streamEnd
-
boundaryPrefix
public static final byte[] boundaryPrefix
-
-
Method Detail
-
process
public static void process(MultiHelper.MultiHandler handler, MimeType contentType, byte[] input) throws Exception
- Throws:
Exception
-
processBoundary
public static void processBoundary(MultiHelper.MultiHandler handler, byte[] boundary, byte[] input) throws Exception
- Throws:
Exception
-
stripPart
public static void stripPart(byte[] bytes, org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers, MultiHelper.MultiHandler handler) throws Exception- Throws:
Exception
-
getBoundary
public static byte[] getBoundary(MimeType contentType)
-
getFileName
public static String getFileName(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers)
-
getFieldName
public static String getFieldName(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers)
-
getParsedHeaders
public static org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders getParsedHeaders(String headerPart)
-
parseEndOfLine
public static int parseEndOfLine(String headerPart, int idx)
-
parseHeaderLine
public static void parseHeaderLine(org.logdoc.fairhttp.service.tools.MultiHelper.PartHeaders headers, String header)
-
readHeaders
public static String readHeaders(InputStream stream) throws IOException
- Throws:
IOException
-
nextBoundary
public static boolean nextBoundary(byte[] boundary, InputStream stream, OutputStream sump) throws IOException- Throws:
IOException
-
-