public abstract class AbstractHttpData extends java.lang.Object implements HttpData
InterfaceHttpData.HttpDataType| Modifier and Type | Field and Description |
|---|---|
protected java.nio.charset.Charset |
charset |
protected boolean |
completed |
protected long |
definedSize |
protected long |
maxSize |
protected java.lang.String |
name |
private static java.util.regex.Pattern |
REPLACE_PATTERN |
protected long |
size |
private static java.util.regex.Pattern |
STRIP_PATTERN |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkSize(long newSize)
Check if the new size is not reaching the max limit allowed.
|
java.nio.charset.Charset |
getCharset()
Returns the Charset passed by the browser or null if not defined.
|
java.lang.String |
getName()
Returns the name of this InterfaceHttpData.
|
boolean |
isCompleted() |
long |
length()
Returns the size in byte of the InterfaceHttpData
|
void |
setCharset(java.nio.charset.Charset charset)
Set the Charset passed by the browser if defined
|
void |
setMaxSize(long maxSize)
Set the maxSize for this HttpData.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddContent, delete, get, getChannelBuffer, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContentgetHttpDataTypeprivate static final java.util.regex.Pattern STRIP_PATTERN
private static final java.util.regex.Pattern REPLACE_PATTERN
protected final java.lang.String name
protected long definedSize
protected long size
protected java.nio.charset.Charset charset
protected boolean completed
protected long maxSize
protected AbstractHttpData(java.lang.String name,
java.nio.charset.Charset charset,
long size)
public void setMaxSize(long maxSize)
HttpDatasetMaxSize in interface HttpDatapublic void checkSize(long newSize)
throws java.io.IOException
HttpDatapublic java.lang.String getName()
InterfaceHttpDatagetName in interface InterfaceHttpDatapublic boolean isCompleted()
isCompleted in interface HttpDatapublic java.nio.charset.Charset getCharset()
HttpDatagetCharset in interface HttpDatapublic void setCharset(java.nio.charset.Charset charset)
HttpDatasetCharset in interface HttpDatacharset - Charset to set - must be not null