@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
InputStream
.getInputStream
in interface PartData
InputStream
IOException
- If an error occurs in retrieving the contentpublic byte[] getBytes() throws IOException
PartData
byte[]
.getBytes
in interface PartData
byte[]
IOException
- If an error occurs in retrieving the contentpublic ByteBuffer getByteBuffer() throws IOException
PartData
ByteBuffer
.getByteBuffer
in interface PartData
ByteBuffer
IOException
- If an error occurs in retrieving the contentpublic Optional<MediaType> getContentType()
PartData
getContentType
in interface PartData