|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.biostr.sig.brainj3d.data.CodecFactory
public class CodecFactory
This stores mappings of types to encoders/decoders and data classes to encoders. Note: This class is not threadsafe.
| Constructor Summary | |
|---|---|
CodecFactory()
|
|
| Method Summary | |
|---|---|
static void |
addDecoder(FileType type,
Class<? extends Decoder> decoder)
We only currently support 1 decoder per type. |
static void |
addDecoder(FileType type,
Decoder decoder)
We only currently support 1 decoder per type. |
static void |
addEncoder(FileType type,
Class<? extends Encoder> encoder)
We only support 1 encoder per type. |
static void |
addEncoder(FileType type,
Encoder encoder)
We only support 1 encoder per type. |
static Decoder |
getDecoder(FileType type)
Get the decoder for the specified type. |
static Map<FileType,Decoder> |
getDecoders()
Get a map of types->decoders. |
static Encoder |
getEncoder(Class<? extends Data> type)
Get the encoder for the specified type. |
static Encoder |
getEncoder(FileType type)
Get the encoder for the specified type. |
static Map<FileType,Encoder> |
getEncoders()
Get a map of types->decoders. |
static void |
getTypesForData(Class<? extends Data> data,
Collection<? super FileType> types)
Look up a class of data and add all of the types that produce that data to types |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CodecFactory()
| Method Detail |
|---|
public static void getTypesForData(Class<? extends Data> data,
Collection<? super FileType> types)
data - types -
public static void addDecoder(FileType type,
Decoder decoder)
type - decoder -
public static void addEncoder(FileType type,
Encoder encoder)
type - encoder -
public static void addDecoder(FileType type,
Class<? extends Decoder> decoder)
throws IllegalAccessException,
InstantiationException
type - decoder -
IllegalAccessException
InstantiationException
public static void addEncoder(FileType type,
Class<? extends Encoder> encoder)
throws IllegalAccessException,
InstantiationException
type - encoder -
IllegalAccessException
InstantiationExceptionpublic static Decoder getDecoder(FileType type)
type -
public static Encoder getEncoder(FileType type)
type -
public static Encoder getEncoder(Class<? extends Data> type)
type -
public static Map<FileType,Decoder> getDecoders()
public static Map<FileType,Encoder> getEncoders()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||