|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Chunk.Encoder
This interface specifies the methods that must be implemented by a class that encodes chunk data as
character data for use as a text node of an XML file. The encoder is used by the chunk's toXml(org.w3c.dom.Document)
method.
Chunk.getEncoder()
,
Chunk.setEncoder(Chunk.Encoder)
Method Summary | |
---|---|
java.lang.String |
encode(byte[] data,
int offset,
int length,
boolean endOfInput)
Encodes the specified byte data as a string. |
int |
getInputLength(long size)
Returns the length of a block of input data that the encode method expects to
receive. |
void |
reset()
Resets the chunk encoder before any encoding is performed. |
Method Detail |
---|
void reset()
int getInputLength(long size)
encode
method expects to
receive. A value of zero indicates that the encode
method will accept a block of any
length.
size
- the size of the chunk data.
encode
method expects to
receive; 0
, if the encode
method will accept a block of any length.java.lang.String encode(byte[] data, int offset, int length, boolean endOfInput) throws java.lang.IllegalArgumentException
toXml(org.w3c.dom.Document)
method, this method will be called on
successive blocks of the chunk data.
data
- the data that are to be encoded.offset
- the offset to data
at which the input data begin.length
- the length of the input data.endOfInput
- true
if the input data are the last that are to be encoded; false
otherwise.
java.lang.IllegalArgumentException
- if
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |