| java.lang.Object org.jvnet.staxex.Base64Data
Method Summary | |
public char | charAt(int index) Encode this binary data in the base64 encoding
and returns the character at the specified position. | public Base64Data | clone() | public byte[] | get() Gets the raw data. | public DataHandler | getDataHandler() Gets the raw data. | public int | getDataLen() Gets the length of the binary data counted in bytes. | public byte[] | getExact() Gets the byte[] of the exact length. | public InputStream | getInputStream() Gets the data as an
InputStream . | public String | getMimeType() | public boolean | hasData() Returns false if this object only has
DataHandler and therefore
Base64Data.get() operation is likely going to be expensive. | public int | length() Gets the number of characters needed to represent
this binary data in the base64 encoding. | public void | set(byte[] data, int len, String mimeType, boolean cloneByRef) Fills in the data object by a portion of the byte[]. | public void | set(byte[] data, int len, String mimeType) Fills in the data object by a portion of the byte[]. | public void | set(byte[] data, String mimeType) Fills in the data object by the byte[] of the exact length. | public void | set(DataHandler data) Fills in the data object by a
DataHandler . | public CharSequence | subSequence(int start, int end) Internally this is only used to split a text to a list,
which doesn't happen that much for base64. | public String | toString() Returns the base64 encoded string of this data. | public void | writeTo(char[] buf, int start) |
Base64Data | public Base64Data()(Code) | | Default constructor
|
Base64Data | public Base64Data(Base64Data that)(Code) | | Clone constructor
Parameters: that - needs to be cloned |
charAt | public char charAt(int index)(Code) | | Encode this binary data in the base64 encoding
and returns the character at the specified position.
|
get | public byte[] get()(Code) | | Gets the raw data. The size of the byte array maybe larger than the actual length.
data as byte[], the array may be larger |
getDataLen | public int getDataLen()(Code) | | Gets the length of the binary data counted in bytes.
Note that if this object encapsulates
DataHandler ,
this method would have to read the whole thing into
byte[] just to count the length, because
DataHandler doesn't easily expose the length.
no of bytes |
getExact | public byte[] getExact()(Code) | | Gets the byte[] of the exact length.
byte[] for data |
hasData | public boolean hasData()(Code) | | Returns false if this object only has
DataHandler and therefore
Base64Data.get() operation is likely going to be expensive.
false if it has only DataHandler |
length | public int length()(Code) | | Gets the number of characters needed to represent
this binary data in the base64 encoding.
|
set | public void set(byte[] data, int len, String mimeType, boolean cloneByRef)(Code) | | Fills in the data object by a portion of the byte[].
Parameters: data - actual data Parameters: len - data[0] to data[len-1] are treated as the data. Parameters: mimeType - MIME type Parameters: cloneByRef - true if data[] can be cloned by reference |
set | public void set(byte[] data, int len, String mimeType)(Code) | | Fills in the data object by a portion of the byte[].
Parameters: data - actual data bytes Parameters: len - data[0] to data[len-1] are treated as the data. Parameters: mimeType - MIME type |
set | public void set(byte[] data, String mimeType)(Code) | | Fills in the data object by the byte[] of the exact length.
Parameters: data - this buffer may be owned directly by the unmarshaleld JAXB object. Parameters: mimeType - MIME type |
subSequence | public CharSequence subSequence(int start, int end)(Code) | | Internally this is only used to split a text to a list,
which doesn't happen that much for base64.
So this method should be smaller than faster.
|
toString | public String toString()(Code) | | Returns the base64 encoded string of this data.
|
writeTo | public void writeTo(char[] buf, int start)(Code) | | |
|
|