public abstract class MultipartPart<T extends PartBase>
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
protected byte[] |
boundary |
protected static byte[] |
CRLF_BYTES
Carriage return/linefeed as a byte array
|
protected static byte[] |
EXTRA_BYTES
Extra characters as a byte array
|
protected T |
part |
protected MultipartState |
state |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected io.netty.buffer.ByteBuf |
computePostContentBytes(int postContentLength) |
protected int |
computePostContentLength() |
protected io.netty.buffer.ByteBuf |
computePreContentBytes(int preContentLength) |
protected int |
computePreContentLength() |
protected abstract long |
getContentLength() |
MultipartState |
getState() |
boolean |
isTargetSlow() |
long |
length() |
protected long |
transfer(io.netty.buffer.ByteBuf source,
io.netty.buffer.ByteBuf target,
MultipartState sourceFullyWrittenState) |
protected long |
transfer(io.netty.buffer.ByteBuf source,
java.nio.channels.WritableByteChannel target,
MultipartState sourceFullyWrittenState) |
protected abstract long |
transferContentTo(io.netty.buffer.ByteBuf target) |
protected abstract long |
transferContentTo(java.nio.channels.WritableByteChannel target) |
long |
transferTo(io.netty.buffer.ByteBuf target) |
long |
transferTo(java.nio.channels.WritableByteChannel target) |
protected void |
visitContentIdHeader(PartVisitor visitor) |
protected void |
visitContentTypeHeader(PartVisitor visitor) |
protected void |
visitCustomHeaders(PartVisitor visitor) |
protected void |
visitDispositionHeader(PartVisitor visitor) |
protected void |
visitEndOfHeaders(PartVisitor visitor) |
protected void |
visitPostContent(PartVisitor visitor) |
protected void |
visitPreContent(PartVisitor visitor) |
protected void |
visitStart(PartVisitor visitor) |
protected void |
visitTransferEncodingHeader(PartVisitor visitor) |
protected static final byte[] CRLF_BYTES
protected static final byte[] EXTRA_BYTES
protected final byte[] boundary
protected MultipartState state
public long length()
public MultipartState getState()
public boolean isTargetSlow()
public long transferTo(io.netty.buffer.ByteBuf target) throws java.io.IOException
java.io.IOException
public long transferTo(java.nio.channels.WritableByteChannel target) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
protected abstract long getContentLength()
protected abstract long transferContentTo(io.netty.buffer.ByteBuf target) throws java.io.IOException
java.io.IOException
protected abstract long transferContentTo(java.nio.channels.WritableByteChannel target) throws java.io.IOException
java.io.IOException
protected long transfer(io.netty.buffer.ByteBuf source, io.netty.buffer.ByteBuf target, MultipartState sourceFullyWrittenState)
protected long transfer(io.netty.buffer.ByteBuf source, java.nio.channels.WritableByteChannel target, MultipartState sourceFullyWrittenState) throws java.io.IOException
java.io.IOException
protected int computePreContentLength()
protected io.netty.buffer.ByteBuf computePreContentBytes(int preContentLength)
protected int computePostContentLength()
protected io.netty.buffer.ByteBuf computePostContentBytes(int postContentLength)
protected void visitStart(PartVisitor visitor)
protected void visitDispositionHeader(PartVisitor visitor)
protected void visitContentTypeHeader(PartVisitor visitor)
protected void visitTransferEncodingHeader(PartVisitor visitor)
protected void visitContentIdHeader(PartVisitor visitor)
protected void visitCustomHeaders(PartVisitor visitor)
protected void visitEndOfHeaders(PartVisitor visitor)
protected void visitPreContent(PartVisitor visitor)
protected void visitPostContent(PartVisitor visitor)
Copyright © 2018. All Rights Reserved.