|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectloci.formats.codec.BaseCodec
loci.formats.codec.Base64Codec
public class Base64Codec
Implements encoding (compress) and decoding (decompress) methods for Base64. This code was adapted from the Jakarta Commons Codec source, http://jakarta.apache.org/commons
| Constructor Summary | |
|---|---|
Base64Codec()
|
|
| Method Summary | |
|---|---|
byte[] |
base64Decode(String s)
Decodes a Base64 String by converting to bytes and passing to the decompress method. |
byte[] |
compress(byte[] input,
int x,
int y,
int[] dims,
Object options)
Encodes a block of data into Base64. |
byte[] |
decompress(byte[] base64Data,
Object options)
Decompresses a block of data. |
static void |
main(String[] args)
Main testing method. test is inherited from parent class. |
| Methods inherited from class loci.formats.codec.BaseCodec |
|---|
compress, decompress, decompress, decompress, test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface loci.formats.codec.Codec |
|---|
compress, decompress, decompress, decompress |
| Constructor Detail |
|---|
public Base64Codec()
| Method Detail |
|---|
public byte[] compress(byte[] input,
int x,
int y,
int[] dims,
Object options)
throws loci.formats.FormatException
compress in interface Codecinput - the data to be encoded.x - ignored.y - ignored.dims - ignored.options - ignored.
loci.formats.FormatException - If input is not a compressed data block of the
appropriate type.
public byte[] decompress(byte[] base64Data,
Object options)
throws loci.formats.FormatException
decompress in interface Codecbase64Data - the data to be decodedoptions - Options to be used during decompression.
loci.formats.FormatException - if data is not valid Base64 data
public byte[] base64Decode(String s)
throws loci.formats.FormatException
s - the String to be decoded
loci.formats.FormatException - if s is not valid Base64 data.
public static void main(String[] args)
throws loci.formats.FormatException
args - ignored
loci.formats.FormatException - Can only occur if there is a bug in the
compress method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||