| Modifier and Type | Field and Description |
|---|---|
| private Charset | |
| private boolean | |
| private String | |
| private String | |
| private Handler | |
| private Handler | |
| private Handler | |
| private String | |
| private long | |
| private final String | |
| private final InboundBuffer | |
| private final HttpServerRequest | |
| private final long |
| Access | Constructor and Description |
|---|---|
| pack-priv | NettyFileUpload(Context context, HttpServerRequest request, String name, String filename, String contentType, String contentTransferEncoding, Charset charset, long size)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addContent(ByteBuf
must be not null except if last is set to False channelBuffer, boolean True of the buffer is the last one last)Implements io. Add the content from the ChannelBuffer
|
| public void | checkSize(long newSize)
Implements io. Check if the new size is not reaching the max limit allowed. |
| public int | compareTo(InterfaceHttpData
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public ByteBuf | content()
Implements io. Return the data which is held by this |
| public FileUpload | copy()
Implements io. Creates a deep copy of this |
| public long | definedLength()
Implements io. Returns the defined length of the HttpData. |
| public void | delete()
Implements io. Deletes the underlying storage for a file item, including deleting any associated temporary disk file. |
| public FileUpload | duplicate()
Implements io. Duplicates this |
| private void | |
| private synchronized Handler | |
| public synchronized NettyFileUpload | |
| public synchronized NettyFileUpload | |
| public NettyFileUpload | fetch(long amount)
Implements io. Fetch the specified |
| public byte[] | get()
Implements io. Returns the contents of the file item as an array of bytes. |
| public ByteBuf | getByteBuf()
Implements io. Returns the content of the file item as a ByteBuf. |
| public Charset | getCharset()
Implements io. Returns the Charset passed by the browser or null if not defined. |
| public ByteBuf | getChunk(int i)
Implements 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. |
| public String | getContentTransferEncoding()
Implements io. Returns the Content-Transfer-Encoding |
| public String | getContentType()
Implements io. Returns the content type passed by the browser or null if not defined. |
| public File | |
| public String | getFilename()
Implements io. Returns the original filename in the client's filesystem, as provided by the browser (or other client software). |
| public InterfaceHttpData. | |
| public long | getMaxSize()
Implements io. Returns the maxSize for this HttpData. |
| public String | getName()
Implements io. Returns the name of this InterfaceHttpData. |
| public String | getString()
Implements io. Returns the contents of the file item as a String, using the default character encoding. |
| public String | getString(Charset
the charset to use charset)Implements io. Returns the contents of the file item as a String, using the specified charset. |
| public void | |
| private Handler | |
| public synchronized NettyFileUpload | |
| public boolean | |
| public boolean | isInMemory()
Implements io. Provides a hint as to whether or not the file contents will be read from memory. |
| public long | length()
Implements io. Returns the size in byte of the InterfaceHttpData |
| public NettyFileUpload | pause()
Implements io. Pause the |
| private void | receiveData(Buffer data)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public int | refCnt()
Implements io. Returns the reference count of this object. |
| public boolean | release()
Implements io. Decreases the reference count by |
| public boolean | release(int decrement)
Implements io. Decreases the reference count by the specified |
| public boolean | renameTo(File
destination file - must be not null file)Implements io. A convenience getMethod to write an uploaded item to disk. |
| public FileUpload | replace(ByteBuf content)
Implements io. Returns a new |
| public NettyFileUpload | resume()
Implements io. Resume reading, and sets the buffer in |
| public FileUpload | retain()
Implements io. Increases the reference count by |
| public FileUpload | retain(int increment)
Implements io. Increases the reference count by the specified |
| public FileUpload | retainedDuplicate()
Implements io. Duplicates this |
| public void | setCharset(Charset
Charset to set - must be not null charset)Implements io. Set the Charset passed by the browser if defined |
| public void | setContent(ByteBuf
must be not null channelBuffer)Implements io. Set the content from the ChannelBuffer (erase any previous data)
|
| public void | setContent(File
must be not null file)Implements io. Set the content from the file (erase any previous data) |
| public void | setContent(InputStream
must be not null inputStream)Implements io. Set the content from the inputStream (erase any previous data) |
| public void | setContentTransferEncoding(String contentTransferEncoding)
Implements io. Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary |
| public void | setContentType(String
Content Type to set - must be not null contentType)Implements io. Set the Content Type passed by the browser if defined |
| public void | setFilename(String filename)
Implements io. Set the original filename |
| public void | setMaxSize(long maxSize)
Implements io. Set the maxSize for this HttpData. |
| public FileUpload | touch(Object hint)
Implements io. Records the current access location of this object with an additional arbitrary information for debugging purposes. |
| public FileUpload | touch()
Implements io. Records the current access location of this object for debugging purposes. |
| charset | back to summary |
|---|---|
| private Charset charset | |
| completed | back to summary |
|---|---|
| private boolean completed | |
| contentTransferEncoding | back to summary |
|---|---|
| private String contentTransferEncoding | |
| contentType | back to summary |
|---|---|
| private String contentType | |
| dataHandler | back to summary |
|---|---|
| private Handler<Buffer> dataHandler | |
| endHandler | back to summary |
|---|---|
| private Handler<Void> endHandler | |
| exceptionHandler | back to summary |
|---|---|
| private Handler<Throwable> exceptionHandler | |
| filename | back to summary |
|---|---|
| private String filename | |
| maxSize | back to summary |
|---|---|
| private long maxSize | |
| name | back to summary |
|---|---|
| private final String name | |
| pending | back to summary |
|---|---|
| private final InboundBuffer<Object> pending | |
| request | back to summary |
|---|---|
| private final HttpServerRequest request | |
| size | back to summary |
|---|---|
| private final long size | |
| NettyFileUpload | back to summary |
|---|---|
| pack-priv NettyFileUpload(Context context, HttpServerRequest request, String name, String filename, String contentType, String contentTransferEncoding, Charset charset, long size) | |
| addContent | back to summary |
|---|---|
| public void addContent(ByteBuf channelBuffer, boolean last) throws IOException Implements io. Doc from io. Add the content from the ChannelBuffer
| |
| 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
| |
| content | back to summary |
|---|---|
| public ByteBuf content() Implements io. Doc from io. Return the data which is held by this
| |
| copy | back to summary |
|---|---|
| public FileUpload copy() Implements io. Doc from io. Creates a deep copy of this
| |
| 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.
| |
| duplicate | back to summary |
|---|---|
| public FileUpload duplicate() Implements io. Doc from io. Duplicates this | |
| end | back to summary |
|---|---|
| private void end() | |
| endHandler | back to summary |
|---|---|
| private synchronized Handler | |
| endHandler | back to summary |
|---|---|
public synchronized NettyFileUpload endHandler(Handler<Void> handler)
| |
| exceptionHandler | back to summary |
|---|---|
public synchronized NettyFileUpload exceptionHandler(Handler<Throwable> handler)
| |
| fetch | back to summary |
|---|---|
| public NettyFileUpload fetch(long amount) Implements io. Doc from io. Fetch the specified
| |
| 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.
| |
| 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. | |
| 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 ByteBuf getChunk(int i) 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. | |
| getContentTransferEncoding | back to summary |
|---|---|
| public String getContentTransferEncoding() Implements io. Doc from io. Returns the Content-Transfer-Encoding | |
| getContentType | back to summary |
|---|---|
| public String getContentType() Implements io. Doc from io. Returns the content type passed by the browser or null if not defined. | |
| getFile | back to summary |
|---|---|
| public File getFile() throws IOException Implements io.
| |
| getFilename | back to summary |
|---|---|
| public String getFilename() Implements io. Doc from io. Returns the original filename in the client's filesystem, as provided by the browser (or other client software). | |
| 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 charset) throws IOException Implements io. Doc from io. Returns the contents of the file item as a String, using the specified charset. | |
| handleException | back to summary |
|---|---|
| public void handleException(Throwable err) | |
| handler | back to summary |
|---|---|
| private Handler | |
| handler | back to summary |
|---|---|
public synchronized NettyFileUpload handler(Handler<Buffer> handler)
| |
| 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
| |
| pause | back to summary |
|---|---|
| public NettyFileUpload pause() Implements io. Doc from io. Pause the
While it's paused, no data will be sent to the data
| |
| receiveData | back to summary |
|---|---|
| private void receiveData(Buffer data)
References Deprecated
See corresponding docs for further information. | |
| refCnt | back to summary |
|---|---|
| public int refCnt() Implements io. Doc from io. Returns the reference count of this object. If
| |
| release | back to summary |
|---|---|
| public boolean release() Implements io. Doc from io. Decreases the reference count by
| |
| release | back to summary |
|---|---|
| public boolean release(int decrement) Implements io. Doc from io. Decreases the reference count by the specified
| |
| renameTo | back to summary |
|---|---|
| public boolean renameTo(File file) 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 FileUpload replace(ByteBuf content) Implements io. Doc from io. Returns a new
| |
| resume | back to summary |
|---|---|
| public NettyFileUpload resume() Implements io. Doc from io. Resume reading, and sets the buffer in
If the
| |
| retain | back to summary |
|---|---|
| public FileUpload retain() Implements io. Doc from io. Increases the reference count by
| |
| retain | back to summary |
|---|---|
| public FileUpload retain(int increment) Implements io. Doc from io. Increases the reference count by the specified
| |
| retainedDuplicate | back to summary |
|---|---|
| public FileUpload retainedDuplicate() Implements io. Doc from io. Duplicates this
| |
| 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(ByteBuf channelBuffer) 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)
| |
| setContentTransferEncoding | back to summary |
|---|---|
| public void setContentTransferEncoding(String contentTransferEncoding) Implements io. Doc from io. Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
| |
| setContentType | back to summary |
|---|---|
| public void setContentType(String contentType) Implements io. Doc from io. Set the Content Type passed by the browser if defined | |
| setFilename | back to summary |
|---|---|
| public void setFilename(String filename) Implements io. Doc from io. Set the original filename
| |
| 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.
| |
| touch | back to summary |
|---|---|
| public FileUpload touch(Object hint) 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
| |
| touch | back to summary |
|---|---|
| public FileUpload touch() 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
| |