Class AbstractHttpData
java.lang.Object
org.jboss.netty.handler.codec.http.multipart.AbstractHttpData
- All Implemented Interfaces:
Comparable<InterfaceHttpData>, HttpData, InterfaceHttpData
- Direct Known Subclasses:
AbstractDiskHttpData, AbstractMemoryHttpData
-
Nested Class Summary
Nested classes/interfaces inherited from interface InterfaceHttpData
InterfaceHttpData.HttpDataType -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractHttpData(String name, Charset charset, long size) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSize(long newSize) Check if the new size is not reaching the max limit allowed.Returns the Charset passed by the browser or null if not defined.getName()Returns the name of this InterfaceHttpData.booleanlonglength()Returns the size in byte of the InterfaceHttpDatavoidsetCharset(Charset charset) Set the Charset passed by the browser if definedvoidsetMaxSize(long maxSize) Set the maxSize for this HttpData.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparable
compareToMethods inherited from interface HttpData
addContent, delete, get, getChannelBuffer, getChunk, getFile, getString, getString, isInMemory, renameTo, setContent, setContent, setContentMethods inherited from interface InterfaceHttpData
getHttpDataType
-
Field Details
-
STRIP_PATTERN
-
REPLACE_PATTERN
-
name
-
definedSize
protected long definedSize -
size
protected long size -
charset
-
completed
protected boolean completed -
maxSize
protected long maxSize
-
-
Constructor Details
-
AbstractHttpData
-
-
Method Details
-
setMaxSize
public void setMaxSize(long maxSize) Description copied from interface:HttpDataSet 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.- Specified by:
setMaxSizein interfaceHttpData- Parameters:
maxSize-
-
checkSize
Description copied from interface:HttpDataCheck if the new size is not reaching the max limit allowed. The limit is always computed in term of bytes.- Specified by:
checkSizein interfaceHttpData- Parameters:
newSize-- Throws:
IOException
-
getName
Description copied from interface:InterfaceHttpDataReturns the name of this InterfaceHttpData.- Specified by:
getNamein interfaceInterfaceHttpData
-
isCompleted
public boolean isCompleted()- Specified by:
isCompletedin interfaceHttpData- Returns:
- True if the InterfaceHttpData is completed (all data are stored)
-
getCharset
Description copied from interface:HttpDataReturns the Charset passed by the browser or null if not defined.- Specified by:
getCharsetin interfaceHttpData- Returns:
- the Charset passed by the browser or null if not defined.
-
setCharset
Description copied from interface:HttpDataSet the Charset passed by the browser if defined- Specified by:
setCharsetin interfaceHttpData- Parameters:
charset- Charset to set - must be not null
-
length
-