|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.io.Locator.CompactStreamer
public static class Locator.CompactStreamer
A Streamer capable of converting a Locator to
and from byte representation. The streamer can also write locators in a
compact manner for a specific SourceId. That is, by
calling setCompactId(SourceId) an id can be set such that
all locators with this SourceId will not have
their ids written in the byte representation (all others will). Thus,
these locators are written in a very compact way. However, in order to
be able to read them back-in the original SourceId must
of course be known.
| Constructor Summary | |
|---|---|
Locator.CompactStreamer()
|
|
Locator.CompactStreamer(SourceId id)
|
|
| Method Summary | |
|---|---|
Locator |
fromStream(DataInput in)
Reads an object of class E from the data source. |
SourceId |
getCompactId()
|
void |
setCompactId(SourceId id)
|
long |
size(Locator l)
Returns the number of bytes that this Streamer will write
when the toStream method is invoked on the specified
object. |
void |
toStream(DataOutput out,
Locator l)
Writes the internal state of the object to the data source in a format that can later be read by the same Streamer using the
fromStream method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Locator.CompactStreamer()
public Locator.CompactStreamer(SourceId id)
| Method Detail |
|---|
public void setCompactId(SourceId id)
public SourceId getCompactId()
public long size(Locator l)
throws IOException
SizeStreamerStreamer will write
when the toStream method is invoked on the specified
object.
size in interface SizeStreamer<Locator>IOException
public void toStream(DataOutput out,
Locator l)
throws IOException
StreamerStreamer using the
fromStream method.
toStream in interface Streamer<Locator>IOException
public Locator fromStream(DataInput in)
throws IOException
StreamerE from the data source.
fromStream in interface Streamer<Locator>IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||