|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacets.util.Tracer
facets.util.PackedSerialized
public final class PackedSerialized
Converts between Serializables and compressed bytes.
| Field Summary | |
|---|---|
byte[] |
packed
The result of passing a Serializable to the constructor. |
| Constructor Summary | |
|---|---|
PackedSerialized(java.io.Serializable serializable)
Unique constructor. |
|
| Method Summary | |
|---|---|
long |
estimateSize()
|
static PackedSerialized |
newUnpackChecked(java.io.Serializable s)
Creates a PackedSerialized that is guaranteed to unpack. |
static java.io.Serializable |
newUnpacked(byte[] packed)
Attempts to recreate a Serializable from bytes. |
java.lang.String |
toString()
|
protected void |
traceOutput(java.lang.String msg)
Outputs complete trace messages to console or elsewhere. |
java.io.Serializable |
unpack()
Attempts to recreate the Serializable passed to the constructor. |
| Methods inherited from class facets.util.Tracer |
|---|
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutputWithClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final byte[] packed
Serializable to the constructor.
| Constructor Detail |
|---|
public PackedSerialized(java.io.Serializable serializable)
serializable - will be converted to a compressed byte[]
stored as packed| Method Detail |
|---|
protected void traceOutput(java.lang.String msg)
TracerDefault prepends helpful classname to message.
traceOutput in class Tracermsg - passed from one of the public methodspublic java.lang.String toString()
toString in class java.lang.Objectpublic java.io.Serializable unpack()
Serializable passed to the constructor.
Throws a RuntimeException if recreation fails.
public static PackedSerialized newUnpackChecked(java.io.Serializable s)
PackedSerialized that is guaranteed to unpack.
s - passed to constructor
PackedSerialized guaranteed to unpack but possibly not
compressedpublic static java.io.Serializable newUnpacked(byte[] packed)
Serializable from bytes.
packed - is treated as a valid packed
Serializable or null if recreation failspublic long estimateSize()
estimateSize in interface SizeEstimable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||