public abstract class MultipartPart<T extends PartBase> extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected byte[] |
boundary |
protected T |
part |
protected static byte |
QUOTE_BYTE
Content disposition as a byte
|
protected boolean |
slowTarget |
protected MultipartState |
state |
Constructor and Description |
---|
MultipartPart(T part,
byte[] boundary) |
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,
WritableByteChannel target,
MultipartState sourceFullyWrittenState) |
protected abstract long |
transferContentTo(io.netty.buffer.ByteBuf target) |
protected abstract long |
transferContentTo(WritableByteChannel target) |
long |
transferTo(io.netty.buffer.ByteBuf target) |
long |
transferTo(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 QUOTE_BYTE
protected final byte[] boundary
protected MultipartState state
protected boolean slowTarget
public MultipartPart(T part, byte[] boundary)
public long length()
public MultipartState getState()
public boolean isTargetSlow()
public long transferTo(io.netty.buffer.ByteBuf target) throws IOException
IOException
public long transferTo(WritableByteChannel target) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
protected abstract long getContentLength()
protected abstract long transferContentTo(io.netty.buffer.ByteBuf target) throws IOException
IOException
protected abstract long transferContentTo(WritableByteChannel target) throws IOException
IOException
protected long transfer(io.netty.buffer.ByteBuf source, io.netty.buffer.ByteBuf target, MultipartState sourceFullyWrittenState)
protected long transfer(io.netty.buffer.ByteBuf source, WritableByteChannel target, MultipartState sourceFullyWrittenState) throws IOException
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 © 2017. All Rights Reserved.