| Modifier and Type | Field and Description |
|---|---|
| private File | |
| private FileChannel | |
| private boolean | |
| private static final InternalLogger |
| 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. |
| protected abstract boolean | |
| public byte[] | get()
Implements io. |
| protected abstract String | |
| public ByteBuf | getByteBuf()
Implements io. |
| public ByteBuf | getChunk(int length)
Implements io. |
| protected abstract String | |
| public File | |
| protected abstract String | |
| protected abstract String | |
| public String | getString()
Implements io. |
| public String | getString(Charset
the charset to use encoding)Implements io. |
| public boolean | isInMemory()
Implements io. |
| private static byte[] | |
| 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(File
must be not null file)Implements io. |
| public void | setContent(InputStream
must be not null inputStream)Implements io. |
| private File | Returns: a new Temp File from getDiskFilename(), default prefix, postfix and baseDirectory
|
| public HttpData | touch()
Implements abstract io. Implements io. |
| public HttpData | touch(Object hint)
Implements abstract io. Implements io. |
| file | back to summary |
|---|---|
| private File file | |
| fileChannel | back to summary |
|---|---|
| private FileChannel fileChannel | |
| isRenamed | back to summary |
|---|---|
| private boolean isRenamed | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| AbstractDiskHttpData | back to summary |
|---|---|
| protected AbstractDiskHttpData(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.
| |
| deleteOnExit | back to summary |
|---|---|
protected abstract boolean deleteOnExit()
| |
| get | back to summary |
|---|---|
| public byte[] get() throws IOException 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.
| |
| getBaseDirectory | back to summary |
|---|---|
protected abstract String getBaseDirectory()
| |
| getByteBuf | back to summary |
|---|---|
| public ByteBuf getByteBuf() throws IOException Implements io. Doc from io. 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. | |
| 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. | |
| getDiskFilename | back to summary |
|---|---|
protected abstract String getDiskFilename()
| |
| getFile | back to summary |
|---|---|
| public File getFile() throws IOException Implements io.
| |
| getPostfix | back to summary |
|---|---|
protected abstract String getPostfix()
| |
| getPrefix | back to summary |
|---|---|
protected abstract String getPrefix()
| |
| getString | back to summary |
|---|---|
| public String getString() throws IOException 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) throws IOException 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.
| |
| readFrom | back to summary |
|---|---|
| private static byte[] readFrom(File src) throws IOException Utility function
| |
| 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(File file) throws IOException Implements io. Doc from io. Set the content from the file (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)
| |
| tempFile | back to summary |
|---|---|
private File tempFile() throws IOException
| |
| 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
| |