@Internal public class NettyCompletedAttribute extends Object implements CompletedPart
Attribute
to implement
the CompletedPart
contract.Constructor and Description |
---|
NettyCompletedAttribute(io.netty.handler.codec.http.multipart.Attribute attribute) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getByteBuffer()
Gets the content of this chunk as a ByteBuffer.
|
byte[] |
getBytes()
Gets the content of this chunk as a byte[].
|
Optional<MediaType> |
getContentType()
Gets the content type of this chunk.
|
InputStream |
getInputStream()
Gets the content of this chunk as an InputStream.
|
String |
getName() |
public NettyCompletedAttribute(io.netty.handler.codec.http.multipart.Attribute attribute)
attribute
- The netty attributepublic String getName()
getName
in interface CompletedPart
public InputStream getInputStream() throws IOException
PartData
getInputStream
in interface PartData
IOException
- If an error occurs in retrieving the contentpublic byte[] getBytes() throws IOException
PartData
getBytes
in interface PartData
IOException
- If an error occurs in retrieving the contentpublic ByteBuffer getByteBuffer() throws IOException
PartData
getByteBuffer
in interface PartData
IOException
- If an error occurs in retrieving the contentpublic Optional<MediaType> getContentType()
PartData
getContentType
in interface PartData