Top Inners Fields Constructors Methods
io.undertow.util

public Class MultipartParser

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .UnsupportedEncodingException, java.nio.ByteBuffer, io.undertow.connector.ByteBufferPool, .PooledByteBuffer

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static interface
private static class
public static class
public static interface
private static class

Field Summary

Modifier and TypeField and Description
private static final byte[]
BOUNDARY_PREFIX

A byte sequence that precedes a boundary (CRLF--).

public static final byte
CR

The Carriage Return ASCII character value.

public static final byte
DASH

The dash (-) ASCII character value.

public static final byte
HTAB

The Horizontal Tab ASCII character value;

public static final byte
LF

The Line Feed ASCII character value.

public static final byte
SP

The Space ASCII character value;

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static MultipartParser.ParseState
beginParse(final ByteBufferPool bufferPool, final MultipartParser.PartHandler handler, final byte[] boundary, final String requestCharset)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BOUNDARY_PREFIXback to summary
private static final byte[] BOUNDARY_PREFIX

A byte sequence that precedes a boundary (CRLF--).

CRback to summary
public static final byte CR

The Carriage Return ASCII character value.

DASHback to summary
public static final byte DASH

The dash (-) ASCII character value.

HTABback to summary
public static final byte HTAB

The Horizontal Tab ASCII character value;

LFback to summary
public static final byte LF

The Line Feed ASCII character value.

SPback to summary
public static final byte SP

The Space ASCII character value;

Constructor Detail

MultipartParserback to summary
public MultipartParser()

Method Detail

beginParseback to summary
public static MultipartParser.ParseState beginParse(final ByteBufferPool bufferPool, final MultipartParser.PartHandler handler, final byte[] boundary, final String requestCharset)
io.undertow.util back to summary

private Class MultipartParser.Base64Encoding

extends Object
implements Encoding
Class Inheritance
All Implemented Interfaces
io.undertow.util.MultipartParser.Encoding

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
private final FlexBase64.Decoder

Constructor Summary

AccessConstructor and Description
private
Base64Encoding(final ByteBufferPool bufferPool)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferPoolback to summary
private final ByteBufferPool bufferPool
decoderback to summary
private final FlexBase64.Decoder decoder

Constructor Detail

Base64Encodingback to summary
private Base64Encoding(final ByteBufferPool bufferPool)

Method Detail

handleback to summary
public void handle(final MultipartParser.PartHandler handler, final ByteBuffer rawData) throws IOException

Implements io.undertow.util.MultipartParser.Encoding.handle.

Annotations
@Override
io.undertow.util back to summary

private Interface MultipartParser.Encoding

Known Direct Implementers
io.undertow.util.MultipartParser.IdentityEncoding, io.undertow.util.MultipartParser.Base64Encoding, io.undertow.util.MultipartParser.QuotedPrintableEncoding

Method Summary

Modifier and TypeMethod and Description
public void
handle(final MultipartParser.PartHandler handler, final ByteBuffer rawData)

Method Detail

handleback to summary
public void handle(final MultipartParser.PartHandler handler, final ByteBuffer rawData) throws IOException
io.undertow.util back to summary

private Class MultipartParser.IdentityEncoding

extends Object
implements Encoding
Class Inheritance
All Implemented Interfaces
io.undertow.util.MultipartParser.Encoding

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IdentityEncodingback to summary
private IdentityEncoding()

Method Detail

handleback to summary
public void handle(final MultipartParser.PartHandler handler, final ByteBuffer rawData) throws IOException

Implements io.undertow.util.MultipartParser.Encoding.handle.

Annotations
@Override
io.undertow.util back to summary

public Class MultipartParser.ParseState

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]
boundary

The boundary, complete with the initial CRLF--

private final ByteBufferPool
private String
private ByteArrayOutputStream
private MultipartParser.Encoding
private HeaderMap
private final MultipartParser.PartHandler
private String
private int
private int

Constructor Summary

AccessConstructor and Description
public
ParseState(final ByteBufferPool bufferPool, final MultipartParser.PartHandler partHandler, String requestCharset, final byte[] boundary)

Method Summary

Modifier and TypeMethod and Description
private void
entity(final ByteBuffer buffer)

private void
headerName(final ByteBuffer buffer)

private void
headerValue(final ByteBuffer buffer)

public boolean
public void
parse(ByteBuffer buffer)

private void
preamble(final ByteBuffer buffer)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boundaryback to summary
private final byte[] boundary

The boundary, complete with the initial CRLF--

bufferPoolback to summary
private final ByteBufferPool bufferPool
currentHeaderNameback to summary
private String currentHeaderName
currentStringback to summary
private ByteArrayOutputStream currentString
encodingHandlerback to summary
private MultipartParser.Encoding encodingHandler
headersback to summary
private HeaderMap headers
partHandlerback to summary
private final MultipartParser.PartHandler partHandler
requestCharsetback to summary
private String requestCharset
stateback to summary
private int state
subStateback to summary
private int subState

Constructor Detail

ParseStateback to summary
public ParseState(final ByteBufferPool bufferPool, final MultipartParser.PartHandler partHandler, String requestCharset, final byte[] boundary)

Method Detail

entityback to summary
private void entity(final ByteBuffer buffer) throws IOException
headerNameback to summary
private void headerName(final ByteBuffer buffer) throws MalformedMessageException, UnsupportedEncodingException
headerValueback to summary
private void headerValue(final ByteBuffer buffer) throws MalformedMessageException, UnsupportedEncodingException
isCompleteback to summary
public boolean isComplete()
parseback to summary
public void parse(ByteBuffer buffer) throws IOException
preambleback to summary
private void preamble(final ByteBuffer buffer)
setCharacterEncodingback to summary
public void setCharacterEncoding(String encoding)
io.undertow.util back to summary

public Interface MultipartParser.PartHandler

Known Direct Implementers
io.undertow.server.handlers.form.MultiPartParserDefinition.MultiPartUploadHandler

Method Summary

Modifier and TypeMethod and Description
public void
beginPart(final HeaderMap headers)

public void
data(final ByteBuffer buffer)

public void

Method Detail

beginPartback to summary
public void beginPart(final HeaderMap headers)
databack to summary
public void data(final ByteBuffer buffer) throws IOException
endPartback to summary
public void endPart()
io.undertow.util back to summary

private Class MultipartParser.QuotedPrintableEncoding

extends Object
implements Encoding
Class Inheritance
All Implemented Interfaces
io.undertow.util.MultipartParser.Encoding

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
pack-priv boolean
pack-priv byte

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferPoolback to summary
private final ByteBufferPool bufferPool
equalsSeenback to summary
pack-priv boolean equalsSeen
firstCharacterback to summary
pack-priv byte firstCharacter

Constructor Detail

QuotedPrintableEncodingback to summary
private QuotedPrintableEncoding(final ByteBufferPool bufferPool)

Method Detail

handleback to summary
public void handle(final MultipartParser.PartHandler handler, final ByteBuffer rawData) throws IOException

Implements io.undertow.util.MultipartParser.Encoding.handle.

Annotations
@Override