1. Point to a perMessageDeflate example in the wiki; · java-codehunger/Java-WebSocket@7b76007 · GitHub
Skip to content

Commit 7b76007

Browse files
committed
1. Point to a perMessageDeflate example in the wiki;
2. Reference each section here for setter and getter;
1 parent 3eeb3d2 commit 7b76007

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

README.markdown

Lines changed: 1 addition & 0 deletions

src/main/java/org/java_websocket/extensions/permessage_deflate/PerMessageDeflateExtension.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,26 @@ public class PerMessageDeflateExtension extends CompressionExtension {
4949
// For WebSocketServers, this variable holds the extension parameters that the peer client has requested.
5050
// For WebSocketClients, this variable holds the extension parameters that client himself has requested.
5151
private Map<String, String> requestedParameters = new LinkedHashMap<String, String>();
52+
5253
private Inflater inflater = new Inflater(true);
5354
private Deflater deflater = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
5455

56+
public Inflater getInflater() {
57+
return inflater;
58+
}
59+
60+
public void setInflater(Inflater inflater) {
61+
this.inflater = inflater;
62+
}
63+
64+
public Deflater getDeflater() {
65+
return deflater;
66+
}
67+
68+
public void setDeflater(Deflater deflater) {
69+
this.deflater = deflater;
70+
}
71+
5572
/**
5673
*
5774
* @return serverNoContextTakeover
@@ -141,7 +158,7 @@ We can check the getRemaining() method to see whether the data we supplied has b
141158

142159
/**
143160
*
144-
* @param data the bytes of date
161+
* @param data the bytes of data
145162
* @param outputBuffer the output stream
146163
* @throws DataFormatException
147164
*/

src/test/java/org/java_websocket/extensions/PerMessageDeflateExtensionTest.java

Lines changed: 28 additions & 0 deletions

0 commit comments

Comments
 (0)