| Modifier and Type | Field and Description |
|---|---|
| protected Buffer |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addContent(Buffer
must be not null except if last is set to False buffer, boolean True of the buffer is the last one last)Implements io.
|
| protected RuntimeException | |
| public void | delete()
Implements io. |
| public byte[] | get()
Implements io. |
| public Buffer | 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(Buffer
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. |
| protected final void | |
| public <E extends Exception> void | usingBuffer(Helpers.
The file item buffer callback callbackImplements io. |
| byteBuf | back to summary |
|---|---|
| protected Buffer byteBuf | |
| AbstractMemoryHttpData | back to summary |
|---|---|
| protected AbstractMemoryHttpData(String name, Charset charset, long size) | |
| addContent | back to summary |
|---|---|
| public void addContent(Buffer buffer, boolean last) throws IOException Implements io. Doc from io. Add the content from the ChannelBuffer
| |
| createResourceClosedException | back to summary |
|---|---|
| protected RuntimeException createResourceClosedException() Overrides io.
| |
| 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.
| |
| getChunk | back to summary |
|---|---|
| public Buffer getChunk(int length) 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. Buffer ownersip: The buffer ownership of the returned buffer is transferred to the caller | |
| 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(Buffer 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) | |
| setContentInternal | back to summary |
|---|---|
| protected final void setContentInternal(Buffer buffer, long size) | |
| usingBuffer | back to summary |
|---|---|
| public <E extends Exception> void usingBuffer(Helpers. Implements io. Utility to go from a In Memory FileUpload to a Disk (or another implementation) FileUpload
| |