Package org.eclipse.net4j.util.io

# Class StringCompressor

java.lang.Object
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
Author:
  Eike Stepper

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`StringCompressor.Counting`

## Field Summary

Fields
Modifier and Type
Field
Description
`static boolean`
`BYPASS`

### Fields inherited from interface org.eclipse.net4j.util.io.StringIO

`DIRECT`

## Constructor Summary

Constructors
Constructor
Description
`StringCompressor(boolean client)`
Creates a StringCompressor instance.

## Method Summary

Modifier and Type
Method
Description
`Collection<Integer>`
`getPendingAcknowledgements(long timeout)`
`boolean`
`isClient()`
`void`
`processAcknowledgements(Collection<Integer> acknowledgements)`
`String`
`read(ExtendedDataInput in)`
`Collection<Integer>`
`readAcknowledgements(ExtendedDataInput in)`
`protected String`
`readString(ExtendedDataInput in)`
`String`
`toString()`
`void`
`write(ExtendedDataOutput out, String string)`
`void`
`writeAcknowledgements(ExtendedDataOutput out, Collection<Integer> acknowledgements)`
`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 Details

### BYPASS

public static boolean BYPASS

Since:
  3.0

## Constructor Details

### StringCompressor

public StringCompressor(boolean client)
Creates a StringCompressor instance.

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

## Method Details

### 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`

### getPendingAcknowledgements

public Collection<Integer> getPendingAcknowledgements(long timeout)

Since:
  3.8

### writeAcknowledgements

public void writeAcknowledgements(ExtendedDataOutput out, Collection<Integer> acknowledgements) throws IOException

Throws:
  `IOException`
Since:
  3.8

### readAcknowledgements

public Collection<Integer> readAcknowledgements(ExtendedDataInput in) throws IOException

Throws:
  `IOException`
Since:
  3.8

### processAcknowledgements

public void processAcknowledgements(Collection<Integer> acknowledgements)

Since:
  3.8

### 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