Top Description Fields Constructors Methods
io.netty.handler.codec.http.multipart

public abstract Class AbstractHttpData

extends AbstractReferenceCounted
implements HttpData
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http.multipart.HttpData, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted, io.netty.handler.codec.http.multipart.InterfaceHttpData, java.lang.Comparable
Known Direct Subclasses
io.netty.handler.codec.http.multipart.AbstractMemoryHttpData, io.netty.handler.codec.http.multipart.AbstractDiskHttpData
Static Imports
io.netty.util.internal.ObjectUtil.checkNonEmpty

Abstract HttpData implementation

Field Summary

Modifier and TypeField and Description
private Charset
private boolean
protected long
private long
private final String
private static final Pattern
protected long
private static final Pattern

Constructor Summary

AccessConstructor and Description
protected
AbstractHttpData(String name, Charset charset, long size)

Method Summary

Modifier and TypeMethod and Description
public void
checkSize(long newSize)

Implements io.netty.handler.codec.http.multipart.HttpData.checkSize.

Check if the new size is not reaching the max limit allowed.
public ByteBuf
content()

Implements io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.
protected void
deallocate()

Implements abstract io.netty.util.AbstractReferenceCounted.deallocate.

Called once refCnt() is equals 0.
public long
definedLength()

Implements io.netty.handler.codec.http.multipart.HttpData.definedLength.

Returns the defined length of the HttpData.
public Charset
getCharset()

Implements io.netty.handler.codec.http.multipart.HttpData.getCharset.

Returns the Charset passed by the browser or null if not defined.
public long
getMaxSize()

Implements io.netty.handler.codec.http.multipart.HttpData.getMaxSize.

Returns the maxSize for this HttpData.
public String
getName()

Implements io.netty.handler.codec.http.multipart.InterfaceHttpData.getName.

Returns the name of this InterfaceHttpData.
public boolean
public long
length()

Implements io.netty.handler.codec.http.multipart.HttpData.length.

Returns the size in byte of the InterfaceHttpData
public HttpData
public HttpData
retain(int increment)

Overrides io.netty.util.AbstractReferenceCounted.retain.

Implements io.netty.handler.codec.http.multipart.HttpData.retain, io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.
public void
setCharset(Charset
Charset to set - must be not null
charset
)

Implements io.netty.handler.codec.http.multipart.HttpData.setCharset.

Set the Charset passed by the browser if defined
protected void
protected void
setCompleted(boolean completed)

public void
setMaxSize(long maxSize)

Implements io.netty.handler.codec.http.multipart.HttpData.setMaxSize.

Set the maxSize for this HttpData.
public abstract HttpData
touch()

Redeclares io.netty.handler.codec.http.multipart.HttpData.touch, io.netty.util.ReferenceCounted.touch.

Overrides io.netty.util.AbstractReferenceCounted.touch.

Records the current access location of this object for debugging purposes.
public abstract HttpData
touch(Object hint)

Redeclares io.netty.handler.codec.http.multipart.HttpData.touch, io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.util.AbstractReferenceCounted:
refCntreleasereleasesetRefCnt

Field Detail

charsetback to summary
private Charset charset
completedback to summary
private boolean completed
definedSizeback to summary
protected long definedSize
maxSizeback to summary
private long maxSize
nameback to summary
private final String name
REPLACE_PATTERNback to summary
private static final Pattern REPLACE_PATTERN
sizeback to summary
protected long size
STRIP_PATTERNback to summary
private static final Pattern STRIP_PATTERN

Constructor Detail

AbstractHttpDataback to summary
protected AbstractHttpData(String name, Charset charset, long size)

Method Detail

checkSizeback to summary
public void checkSize(long newSize) throws IOException

Implements io.netty.handler.codec.http.multipart.HttpData.checkSize.

Doc from io.netty.handler.codec.http.multipart.HttpData.checkSize.

Check if the new size is not reaching the max limit allowed. The limit is always computed in terms of bytes.

Annotations
@Override
contentback to summary
public ByteBuf content()

Implements io.netty.buffer.ByteBufHolder.content.

Doc from io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.

Annotations
@Override
deallocateback to summary
protected void deallocate()

Implements abstract io.netty.util.AbstractReferenceCounted.deallocate.

Doc from io.netty.util.AbstractReferenceCounted.deallocate.

Called once refCnt() is equals 0.

Annotations
@Override
definedLengthback to summary
public long definedLength()

Implements io.netty.handler.codec.http.multipart.HttpData.definedLength.

Doc from io.netty.handler.codec.http.multipart.HttpData.definedLength.

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 FileUpload or any known big Attribute.

Returns:long

the defined length of the HttpData

Annotations
@Override
getCharsetback to summary
public Charset getCharset()

Implements io.netty.handler.codec.http.multipart.HttpData.getCharset.

Doc from io.netty.handler.codec.http.multipart.HttpData.getCharset.

Returns the Charset passed by the browser or null if not defined.

Returns:Charset

the Charset passed by the browser or null if not defined.

Annotations
@Override
getMaxSizeback to summary
public long getMaxSize()

Implements io.netty.handler.codec.http.multipart.HttpData.getMaxSize.

Doc from io.netty.handler.codec.http.multipart.HttpData.getMaxSize.

Returns the maxSize for this HttpData.

Annotations
@Override
getNameback to summary
public String getName()

Implements io.netty.handler.codec.http.multipart.InterfaceHttpData.getName.

Doc from io.netty.handler.codec.http.multipart.InterfaceHttpData.getName.

Returns the name of this InterfaceHttpData.

Annotations
@Override
isCompletedback to summary
public boolean isCompleted()

Implements io.netty.handler.codec.http.multipart.HttpData.isCompleted.

Returns:boolean

Doc from io.netty.handler.codec.http.multipart.HttpData.isCompleted.

True if the InterfaceHttpData is completed (all data are stored)

Annotations
@Override
lengthback to summary
public long length()

Implements io.netty.handler.codec.http.multipart.HttpData.length.

Doc from io.netty.handler.codec.http.multipart.HttpData.length.

Returns the size in byte of the InterfaceHttpData

Returns:long

the size of the InterfaceHttpData

Annotations
@Override
retainback to summary
public HttpData retain()

Overrides io.netty.util.AbstractReferenceCounted.retain.

Implements io.netty.handler.codec.http.multipart.HttpData.retain, io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public HttpData retain(int increment)

Overrides io.netty.util.AbstractReferenceCounted.retain.

Implements io.netty.handler.codec.http.multipart.HttpData.retain, io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
setCharsetback to summary
public void setCharset(Charset charset)

Implements io.netty.handler.codec.http.multipart.HttpData.setCharset.

Doc from io.netty.handler.codec.http.multipart.HttpData.setCharset.

Set the Charset passed by the browser if defined

Parameters
charset:Charset

Charset to set - must be not null

Annotations
@Override
setCompletedback to summary
protected void setCompleted()
setCompletedback to summary
protected void setCompleted(boolean completed)
setMaxSizeback to summary
public void setMaxSize(long maxSize)

Implements io.netty.handler.codec.http.multipart.HttpData.setMaxSize.

Doc from io.netty.handler.codec.http.multipart.HttpData.setMaxSize.

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.

Annotations
@Override
touchback to summary
public abstract HttpData touch()

Redeclares io.netty.handler.codec.http.multipart.HttpData.touch, io.netty.util.ReferenceCounted.touch.

Overrides io.netty.util.AbstractReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public abstract HttpData touch(Object hint)

Redeclares io.netty.handler.codec.http.multipart.HttpData.touch, io.netty.util.ReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 ResourceLeakDetector.

Annotations
@Override