| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | |
| pack-priv final boolean | |
| private static final Drop | |
| protected final long | |
| pack-priv D |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| 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 void | |
| protected void | |
| public void | checkSize(long newSize)
Implements io. |
| public int | compareTo(InterfaceHttpData
the object to be compared. o)Implements java. |
| public D | copy()
Implements io. HttpData.
|
| protected RuntimeException | |
| public long | definedLength()
Implements io. |
| public void | delete()
Implements io. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public byte[] | get()
Implements io. |
| public Charset | getCharset()
Implements io. |
| public Buffer | getChunk(int length)
Implements io. |
| public File | |
| public InterfaceHttpData. | |
| public long | getMaxSize()
Implements io. |
| public String | getName()
Implements io. |
| public String | getString()
Implements io. |
| public String | getString(Charset
the charset to use encoding)Implements io. |
| public int | |
| public boolean | |
| public boolean | isInMemory()
Implements io. |
| public long | length()
Implements io. |
| pack-priv abstract D | |
| public boolean | renameTo(File
destination file - must be not null dest)Implements io. |
| public D | replace(Buffer content)
Implements io. HttpData which contains the specified content.
|
| public void | setCharset(Charset
Charset to set - must be not null charset)Implements io. |
| public void | setContent(Buffer
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. |
| public void | setMaxSize(long maxSize)
Implements io. |
| public String | |
| public <E extends Exception> void | usingBuffer(Helpers.
The file item buffer callback callbackImplements io. |
| public <E extends Exception> void | usingContent(Helpers.
The file item buffer callback callbackImplements io. |
| baseDir | back to summary |
|---|---|
| pack-priv final String baseDir | |
| deleteOnExit | back to summary |
|---|---|
| pack-priv final boolean deleteOnExit | |
| drop | back to summary |
|---|---|
| private static final Drop<AbstractMixedHttpData<? extends HttpData>> drop | |
| limitSize | back to summary |
|---|---|
| protected final long limitSize | |
| wrapped | back to summary |
|---|---|
| pack-priv D wrapped | |
| AbstractMixedHttpData | back to summary |
|---|---|
| pack-priv AbstractMixedHttpData(long limitSize, String baseDir, boolean deleteOnExit, D initial) | |
| addContent | back to summary |
|---|---|
| public void addContent(Buffer buffer, boolean last) throws IOException Implements io. Doc from io. Add the content from the ChannelBuffer
| |
| checkAccessible | back to summary |
|---|---|
| protected void checkAccessible() | |
| checkAccessible | back to summary |
|---|---|
| protected void checkAccessible(Buffer cleanup) | |
| checkSize | back to summary |
|---|---|
| public void checkSize(long newSize) throws IOException Implements io. Doc from io. Check if the new size is not reaching the max limit allowed. The limit is always computed in terms of bytes.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(InterfaceHttpData o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| copy | back to summary |
|---|---|
| public D copy() Implements io. Doc from io. Creates a deep copy of this
| |
| createResourceClosedException | back to summary |
|---|---|
| protected RuntimeException createResourceClosedException() Implements abstract io.
| |
| definedLength | back to summary |
|---|---|
| public long definedLength() Implements io. Doc from io. 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() Implements io. Doc from io. Deletes the underlying storage for a file item, including deleting any associated temporary disk file.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| 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.
| |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() Implements io. Doc from io. Returns the Charset passed by the browser or null if not defined. | |
| getChunk | back to summary |
|---|---|
| public Buffer 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. 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.
| |
| getHttpDataType | back to summary |
|---|---|
| public InterfaceHttpData. Implements io.
| |
| getMaxSize | back to summary |
|---|---|
| public long getMaxSize() Implements io. Doc from io. Returns the maxSize for this HttpData.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements io. Doc from io. Returns the name of this InterfaceHttpData.
| |
| 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. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isCompleted | back to summary |
|---|---|
| public boolean isCompleted() Implements io.
| |
| 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.
| |
| length | back to summary |
|---|---|
| public long length() Implements io. Doc from io. Returns the size in byte of the InterfaceHttpData
| |
| makeDiskData | back to summary |
|---|---|
| pack-priv abstract D makeDiskData() | |
| 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. | |
| replace | back to summary |
|---|---|
| public D replace(Buffer content) Implements io. Doc from io. Returns a new
| |
| setCharset | back to summary |
|---|---|
| public void setCharset(Charset charset) Implements io. Doc from io. Set the Charset passed by the browser if defined | |
| 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(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)
| |
| setMaxSize | back to summary |
|---|---|
| public void setMaxSize(long maxSize) Implements io. Doc from io. 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| usingBuffer | back to summary |
|---|---|
| public <E extends Exception> void usingBuffer(Helpers. Implements io. Doc from io. Calls the passed callback to operate on the file item as a Buffer. Note this method will allocate a lot of memory, if the data is currently stored on the file system. Buffer ownersip: The ownership of the buffer passed to the callack is not transferred and remains to this HttpData interface.
| |
| usingContent | back to summary |
|---|---|
| public <E extends Exception> void usingContent(Helpers. Implements io. Doc from io. Calls the passed callback to operate on the file item as a Buffer. Note this method will allocate a lot of memory, if the data is currently stored on the file system. Buffer ownersip: The ownership of the buffer passed to the callack is not transferred and remains to this HttpData interface.
| |