public class Stax2ByteArraySource extends Stax2BlockSource
Stax2BlockSource that encapsulates
 a byte array.
Note that no copy is made of the passed-in array, and that further there are direct access methods. Thus, although callers are not to modify contents of returned array, this can not be guaranteed; and as such if this would be a problem (security problem for example), caller has to make a copy of the array and pass that copy to the constructor.
mEncoding, mPublicId, mSystemId| Constructor and Description | 
|---|
Stax2ByteArraySource(byte[] buf,
                    int start,
                    int len)  | 
| Modifier and Type | Method and Description | 
|---|---|
InputStream | 
constructInputStream()
This method creates an  
InputStream via which underlying input
 source can be accessed. | 
Reader | 
constructReader()
Note: if encoding is not explicitly defined, UTF-8 is assumed. 
 | 
byte[] | 
getBuffer()  | 
int | 
getBufferEnd()  | 
int | 
getBufferLength()  | 
int | 
getBufferStart()  | 
getReferencegetEncoding, getPublicId, getSystemId, setEncoding, setPublicId, setSystemIdpublic Reader constructReader() throws IOException
constructReader in class Stax2BlockSourceIOExceptionpublic InputStream constructInputStream() throws IOException
Stax2SourceInputStream via which underlying input
 source can be accessed. Note that caller is responsible for
 closing that InputSource when it is done reading itconstructInputStream in class Stax2BlockSourceIOExceptionpublic byte[] getBuffer()
public int getBufferStart()
public int getBufferLength()
public int getBufferEnd()
Copyright © 2015 fasterxml.com. All Rights Reserved.