Constructor and Description |
---|
NullEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
encode(T data,
OutputStream os)
Writes the given data to the given output stream and returns True if the write completed successfully and
should be committed.
|
static <T> Encoder<T> |
get()
Returns an Encoder for the given data type.
|
String |
getId()
Returns an ID identifying any transformation this encoder may apply to the given data that will be mixed in to
the cache key.
|
public static <T> Encoder<T> get()
T
- The type of data to be written (or not in this case).public boolean encode(T data, OutputStream os)
Encoder
public String getId()
Encoder
If the encoder does not transform the data in a way that significantly affects the cached result (ie performs no unusual compression or downsampling) an empty string is an appropriate id.