Rename NativeZlibEncoder to JdkZlibEncoder
This commit is contained in:
parent
0bf9d24f65
commit
7aceb7ae8e
@ -37,7 +37,7 @@ import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
|
||||
* @apiviz.landmark
|
||||
* @apiviz.has org.jboss.netty.handler.codec.compression.ZlibWrapper
|
||||
*/
|
||||
public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAwareChannelHandler {
|
||||
public class JdkZlibEncoder extends OneToOneEncoder implements LifeCycleAwareChannelHandler {
|
||||
|
||||
private final byte[] out = new byte[8192];
|
||||
private final Deflater deflater;
|
||||
@ -58,7 +58,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder() {
|
||||
public JdkZlibEncoder() {
|
||||
this(6);
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder(int compressionLevel) {
|
||||
public JdkZlibEncoder(int compressionLevel) {
|
||||
this(ZlibWrapper.ZLIB, compressionLevel);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder(ZlibWrapper wrapper) {
|
||||
public JdkZlibEncoder(ZlibWrapper wrapper) {
|
||||
this(wrapper, 6);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder(ZlibWrapper wrapper, int compressionLevel) {
|
||||
public JdkZlibEncoder(ZlibWrapper wrapper, int compressionLevel) {
|
||||
if (compressionLevel < 0 || compressionLevel > 9) {
|
||||
throw new IllegalArgumentException(
|
||||
"compressionLevel: " + compressionLevel + " (expected: 0-9)");
|
||||
@ -126,7 +126,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder(byte[] dictionary) {
|
||||
public JdkZlibEncoder(byte[] dictionary) {
|
||||
this(6, dictionary);
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ public class NativeZlibEncoder extends OneToOneEncoder implements LifeCycleAware
|
||||
*
|
||||
* @throws CompressionException if failed to initialize zlib
|
||||
*/
|
||||
public NativeZlibEncoder(int compressionLevel, byte[] dictionary) {
|
||||
public JdkZlibEncoder(int compressionLevel, byte[] dictionary) {
|
||||
if (compressionLevel < 0 || compressionLevel > 9) {
|
||||
throw new IllegalArgumentException(
|
||||
"compressionLevel: " + compressionLevel + " (expected: 0-9)");
|
@ -16,7 +16,7 @@
|
||||
package org.jboss.netty.handler.codec.http;
|
||||
|
||||
import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import org.jboss.netty.handler.codec.compression.NativeZlibEncoder;
|
||||
import org.jboss.netty.handler.codec.compression.JdkZlibEncoder;
|
||||
import org.jboss.netty.handler.codec.compression.ZlibEncoder;
|
||||
import org.jboss.netty.handler.codec.compression.ZlibWrapper;
|
||||
import org.jboss.netty.handler.codec.embedder.EncoderEmbedder;
|
||||
@ -102,7 +102,7 @@ public class HttpContentCompressor extends HttpContentEncoder {
|
||||
|
||||
if (DetectionUtil.javaVersion() >= 7) {
|
||||
return new EncoderEmbedder<ChannelBuffer>(
|
||||
new NativeZlibEncoder(wrapper, compressionLevel));
|
||||
new JdkZlibEncoder(wrapper, compressionLevel));
|
||||
} else {
|
||||
return new EncoderEmbedder<ChannelBuffer>(
|
||||
new ZlibEncoder(wrapper, compressionLevel, windowBits, memLevel));
|
||||
|
Loading…
Reference in New Issue
Block a user