org.eclipse.net4j.util.io
Class StringCompressor

java.lang.Object
  extended by org.eclipse.net4j.util.io.StringCompressor
All Implemented Interfaces:
StringIO
Direct Known Subclasses:
StringCompressor.Counting

public class StringCompressor
extends Object
implements StringIO

Since:
2.0

Nested Class Summary
static class StringCompressor.Counting
           
 
Field Summary
static boolean BYPASS
           
 
Fields inherited from interface org.eclipse.net4j.util.io.StringIO
DIRECT
 
Constructor Summary
StringCompressor(boolean client)
          Creates a StringCompressor instance.
 
Method Summary
 boolean isClient()
           
 String read(ExtendedDataInput in)
           
protected  String readString(ExtendedDataInput in)
           
 String toString()
           
 void write(ExtendedDataOutput out, String string)
           
protected  void writeString(ExtendedDataOutput out, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BYPASS

public static boolean BYPASS
Since:
3.0
Constructor Detail

StringCompressor

public StringCompressor(boolean client)
Creates a StringCompressor instance.

Parameters:
client - Must be different on both sides of the stream.
Method Detail

isClient

public boolean isClient()

write

public void write(ExtendedDataOutput out,
                  String string)
           throws IOException
Specified by:
write in interface StringIO
Throws:
IOException

read

public String read(ExtendedDataInput in)
            throws IOException
Specified by:
read in interface StringIO
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

writeString

protected void writeString(ExtendedDataOutput out,
                           String value)
                    throws IOException
Throws:
IOException
Since:
3.0

readString

protected String readString(ExtendedDataInput in)
                     throws IOException
Throws:
IOException
Since:
3.0


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.