| Modifier and Type | Method and Description |
|---|---|
| public void | addContent(ByteBuf
must be not null except if last is set to False buffer, boolean True of the buffer is the last one last)Add the content from the ChannelBuffer
|
| public void | |
| public HttpData | |
| public long | Returns: the defined length of the HttpDataReturns the defined length of the HttpData. |
| public void | delete()
Deletes the underlying storage for a file item, including deleting any associated temporary disk file. |
| public HttpData | |
| public byte[] | Returns: the contents of the file item as an array of bytes.Returns the contents of the file item as an array of bytes. |
| public ByteBuf | Returns: the content of the file item as a ByteBufReturns the content of the file item as a ByteBuf. |
| public Charset | Returns: the Charset passed by the browser or null if not defined.Returns the Charset passed by the browser or null if not defined. |
| public ByteBuf | Returns: a ChannelBuffer for the content from the current position or an EMPTY_BUFFER if there is no more data to returnReturns a ChannelBuffer for the content from the current position with at most length read bytes, increasing the current position of the Bytes read. |
| public File | |
| public long | |
| public String | Returns: the contents of the file item as a String, using the default character encoding.Returns the contents of the file item as a String, using the default character encoding. |
| public String | |
| public boolean | |
| public boolean | Returns: True if the file contents is in memory.Provides a hint as to whether or not the file contents will be read from memory. |
| public long | |
| public boolean | |
| public HttpData | replace(ByteBuf content)
Redeclares io. ByteBufHolder which contains the specified content.
|
| public HttpData | retain()
Redeclares io. 1.
|
| public HttpData | retain(int increment)
Redeclares io. increment.
|
| public HttpData | retainedDuplicate()
Redeclares io. ByteBufHolder.
|
| public void | setCharset(Charset
Charset to set - must be not null charset)Set the Charset passed by the browser if defined |
| public void | setContent(ByteBuf
must be not null buffer)Set the content from the ChannelBuffer (erase any previous data)
|
| public void | |
| public void | setContent(InputStream
must be not null inputStream)Set the content from the inputStream (erase any previous data) |
| public void | |
| public HttpData | touch()
Redeclares io. |
| public HttpData | touch(Object hint)
Redeclares io. |
| addContent | back to summary |
|---|---|
| public void addContent(ByteBuf buffer, boolean last) throws IOException Add the content from the ChannelBuffer
| |
| checkSize | back to summary |
|---|---|
| public void checkSize(long newSize) throws IOException Check if the new size is not reaching the max limit allowed. The limit is always computed in terms of bytes. | |
| copy | back to summary |
|---|---|
| public HttpData copy() Redeclares io. Doc from io. Creates a deep copy of this
| |
| definedLength | back to summary |
|---|---|
| public long definedLength() Returns the defined length of the HttpData.
If no Content-Length is provided in the request, the defined length is
always 0 (whatever during decoding or in final state).
If Content-Length is provided in the request, this is this given defined length.
This value does not change, whatever during decoding or in the final state.
This method could be used for instance to know the amount of bytes transmitted for
one particular HttpData, for example one
| |
| delete | back to summary |
|---|---|
| public void delete() Deletes the underlying storage for a file item, including deleting any associated temporary disk file. | |
| duplicate | back to summary |
|---|---|
| public HttpData duplicate() Redeclares io. Doc from io. Duplicates this
| |
| get | back to summary |
|---|---|
| public byte[] get() throws IOException Returns the contents of the file item as an array of bytes. Note this method will allocate a lot of memory, if the data is currently stored on the file system.
| |
| getByteBuf | back to summary |
|---|---|
| public ByteBuf getByteBuf() throws IOException Returns the content of the file item as a ByteBuf. Note this method will allocate a lot of memory, if the data is currently stored on the file system.
| |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() Returns the Charset passed by the browser or null if not defined.
| |
| getChunk | back to summary |
|---|---|
| public ByteBuf getChunk(int length) throws IOException Returns a ChannelBuffer for the content from the current position with at most length read bytes, increasing the current position of the Bytes read. Once it arrives at the end, it returns an EMPTY_BUFFER and it resets the current position to 0.
| |
| getFile | back to summary |
|---|---|
public File getFile() throws IOException
| |
| getMaxSize | back to summary |
|---|---|
| public long getMaxSize() Returns the maxSize for this HttpData. | |
| getString | back to summary |
|---|---|
| public String getString() throws IOException Returns the contents of the file item as a String, using the default character encoding.
| |
| getString | back to summary |
|---|---|
| public String getString(Charset encoding) throws IOException Returns the contents of the file item as a String, using the specified charset. | |
| isCompleted | back to summary |
|---|---|
public boolean isCompleted()
| |
| isInMemory | back to summary |
|---|---|
| public boolean isInMemory() Provides a hint as to whether or not the file contents will be read from memory.
| |
| length | back to summary |
|---|---|
| public long length() Returns the size in byte of the InterfaceHttpData
| |
| renameTo | back to summary |
|---|---|
| public boolean renameTo(File dest) throws IOException A convenience getMethod to write an uploaded item to disk. If a previous one exists, it will be deleted. Once this getMethod is called, if successful, the new file will be out of the cleaner of the factory that creates the original InterfaceHttpData object.
| |
| replace | back to summary |
|---|---|
| public HttpData replace(ByteBuf content) Redeclares io. Doc from io. Returns a new
| |
| retain | back to summary |
|---|---|
| public HttpData retain() Redeclares io. Doc from io. Increases the reference count by
| |
| retain | back to summary |
|---|---|
| public HttpData retain(int increment) Redeclares io. Doc from io. Increases the reference count by the specified
| |
| retainedDuplicate | back to summary |
|---|---|
| public HttpData retainedDuplicate() Redeclares io. Doc from io. Duplicates this
| |
| setCharset | back to summary |
|---|---|
| public void setCharset(Charset charset) Set the Charset passed by the browser if defined
| |
| setContent | back to summary |
|---|---|
| public void setContent(ByteBuf buffer) throws IOException Set the content from the ChannelBuffer (erase any previous data)
| |
| setContent | back to summary |
|---|---|
| public void setContent(File file) throws IOException Set the content from the file (erase any previous data)
| |
| setContent | back to summary |
|---|---|
| public void setContent(InputStream inputStream) throws IOException Set the content from the inputStream (erase any previous data)
| |
| setMaxSize | back to summary |
|---|---|
| public void setMaxSize(long maxSize) Set the maxSize for this HttpData. When limit will be reached, an exception will be raised. Setting it to (-1) means no limitation. By default, to be set from the HttpDataFactory. | |
| touch | back to summary |
|---|---|
| public HttpData touch() Redeclares io. Doc from io. Records the current access location of this object for debugging purposes.
If this object is determined to be leaked, the information recorded by this operation will be provided to you
via
| |
| touch | back to summary |
|---|---|
| public HttpData touch(Object hint) Redeclares io. Doc from io. Records the current access location of this object with an additional arbitrary information for debugging
purposes. If this object is determined to be leaked, the information recorded by this operation will be
provided to you via
| |