| Modifier and Type | Field and Description |
|---|---|
| private ByteBuf | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected |
| 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)Implements io.
|
| public void | delete()
Implements io. |
| public byte[] | get()
Implements io. |
| public ByteBuf | Returns: the attached ByteBuf containing the actual bytesImplements io. |
| public ByteBuf | getChunk(int length)
Implements io. |
| public File | |
| public String | getString()
Implements io. |
| public String | getString(Charset
the charset to use encoding)Implements io. |
| public boolean | isInMemory()
Implements io. |
| public boolean | renameTo(File
destination file - must be not null dest)Implements io. |
| public void | setContent(ByteBuf
must be not null buffer)Implements io.
|
| public void | setContent(InputStream
must be not null inputStream)Implements io. |
| public void | setContent(File
must be not null file)Implements io. |
| public HttpData | touch()
Implements abstract io. Implements io. |
| public HttpData | touch(Object hint)
Implements abstract io. Implements io. |
| byteBuf | back to summary |
|---|---|
| private ByteBuf byteBuf | |
| chunkPosition | back to summary |
|---|---|
| private int chunkPosition | |
| AbstractMemoryHttpData | back to summary |
|---|---|
| protected AbstractMemoryHttpData(String name, Charset charset, long size) | |
| addContent | back to summary |
|---|---|
| public void addContent(ByteBuf buffer, boolean last) throws IOException Implements io. Doc from io. Add the content from the ChannelBuffer
| |
| delete | back to summary |
|---|---|
| public void delete() Implements io. Doc from io. Deletes the underlying storage for a file item, including deleting any associated temporary disk file.
| |
| get | back to summary |
|---|---|
| public byte[] get() Implements io. Doc from io. 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() Implements io. Utility to go from a In Memory FileUpload to a Disk (or another implementation) FileUpload | |
| getChunk | back to summary |
|---|---|
| public ByteBuf getChunk(int length) throws IOException Implements io. Doc from io. 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 Implements io.
| |
| getString | back to summary |
|---|---|
| public String getString() Implements io. Doc from io. Returns the contents of the file item as a String, using the default character encoding. | |
| getString | back to summary |
|---|---|
| public String getString(Charset encoding) Implements io. Doc from io. Returns the contents of the file item as a String, using the specified charset. | |
| isInMemory | back to summary |
|---|---|
| public boolean isInMemory() Implements io. Doc from io. Provides a hint as to whether or not the file contents will be read from memory.
| |
| renameTo | back to summary |
|---|---|
| public boolean renameTo(File dest) throws IOException Implements io. Doc from io. 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. | |
| setContent | back to summary |
|---|---|
| public void setContent(ByteBuf buffer) throws IOException Implements io. Doc from io. Set the content from the ChannelBuffer (erase any previous data)
| |
| setContent | back to summary |
|---|---|
| public void setContent(InputStream inputStream) throws IOException Implements io. Doc from io. Set the content from the inputStream (erase any previous data)
| |
| setContent | back to summary |
|---|---|
| public void setContent(File file) throws IOException Implements io. Doc from io. Set the content from the file (erase any previous data) | |
| touch | back to summary |
|---|---|
| public HttpData touch() Implements abstract io. Implements 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) Implements abstract io. Implements 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
| |