|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpData

Extended interface for InterfaceHttpData
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.netty.handler.codec.http2.InterfaceHttpData |
|---|
InterfaceHttpData.HttpDataType |
| Method Summary | |
|---|---|
void |
addContent(org.jboss.netty.buffer.ChannelBuffer buffer,
boolean last)
Add the content from the ChannelBuffer |
void |
delete()
Deletes the underlying storage for a file item, including deleting any associated temporary disk file. |
byte[] |
get()
Returns the contents of the file item as an array of bytes. |
org.jboss.netty.buffer.ChannelBuffer |
getChannelBuffer()
Returns the content of the file item as a ChannelBuffer |
Charset |
getCharset()
Returns the Charset passed by the browser or null if not defined. |
org.jboss.netty.buffer.ChannelBuffer |
getChunk(int length)
Returns a ChannelBuffer for the content from the current position with at most length read bytes, increasing the current position of the Bytes read. |
File |
getFile()
|
String |
getString()
Returns the contents of the file item as a String, using the default character encoding. |
String |
getString(Charset encoding)
Returns the contents of the file item as a String, using the specified charset. |
boolean |
isCompleted()
|
boolean |
isInMemory()
Provides a hint as to whether or not the file contents will be read from memory. |
long |
length()
Returns the size in byte of the InterfaceHttpData |
boolean |
renameTo(File dest)
A convenience method to write an uploaded item to disk. |
void |
setCharset(Charset charset)
Set the Charset passed by the browser if defined |
void |
setContent(org.jboss.netty.buffer.ChannelBuffer buffer)
Set the content from the ChannelBuffer (erase any previous data) |
void |
setContent(File file)
Set the content from the file (erase any previous data) |
void |
setContent(InputStream inputStream)
Set the content from the inputStream (erase any previous data) |
| Methods inherited from interface org.jboss.netty.handler.codec.http2.InterfaceHttpData |
|---|
getHttpDataType, getName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
void setContent(org.jboss.netty.buffer.ChannelBuffer buffer)
throws IOException
buffer - must be not null
IOException
void addContent(org.jboss.netty.buffer.ChannelBuffer buffer,
boolean last)
throws IOException
buffer - must be not null except if last is set to Falselast - True of the buffer is the last one
IOException
void setContent(File file)
throws IOException
file - must be not null
IOException
void setContent(InputStream inputStream)
throws IOException
inputStream - must be not null
IOExceptionboolean isCompleted()
long length()
void delete()
byte[] get()
throws IOException
IOException
org.jboss.netty.buffer.ChannelBuffer getChannelBuffer()
throws IOException
IOException
org.jboss.netty.buffer.ChannelBuffer getChunk(int length)
throws IOException
length -
IOException
String getString()
throws IOException
IOException
String getString(Charset encoding)
throws IOException
encoding - the charset to use
IOExceptionvoid setCharset(Charset charset)
charset - Charset to set - must be not nullCharset getCharset()
boolean renameTo(File dest)
throws IOException
dest - destination file - must be not null
IOExceptionboolean isInMemory()
File getFile()
throws IOException
IOException - if this data is not represented by a file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||