public enum NBTCompression extends Enum<NBTCompression>
| Enum Constant and Description |
|---|
DETECTED
Detects what compression the data stream uses, then
extracts and compresses using it.
|
GZIP
Represents a data stream compressed using GZip.
|
UNCOMPRESSED
Represents an uncompressed data stream.
|
ZLIB
Represents a data stream compressed using ZLib.
|
| Modifier and Type | Method and Description |
|---|---|
abstract io.netty.buffer.ByteBuf |
compress(io.netty.buffer.ByteBuf buf)
Compresses a given ByteBuf.
|
static NBTCompression |
detect(io.netty.buffer.ByteBuf buf)
Detects and retrieves the compression used on the given ByteBuf.
|
static NBTCompression |
detect(InputStream is)
Detects and retrieves the compression used on the given InputStream.
|
abstract io.netty.buffer.ByteBuf |
extract(io.netty.buffer.ByteBuf buf)
Extracts a given ByteBuf.
|
static NBTCompression |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NBTCompression[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NBTCompression UNCOMPRESSED
public static final NBTCompression GZIP
public static final NBTCompression ZLIB
public static final NBTCompression DETECTED
public static NBTCompression[] values()
for (NBTCompression c : NBTCompression.values()) System.out.println(c);
public static NBTCompression valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract io.netty.buffer.ByteBuf extract(io.netty.buffer.ByteBuf buf)
buf - The buffer to be extracted.public abstract io.netty.buffer.ByteBuf compress(io.netty.buffer.ByteBuf buf)
buf - The buffer to be compressed.public static NBTCompression detect(io.netty.buffer.ByteBuf buf)
buf - The buffer to check the compression of.UNCOMPRESSED if not recognized.public static NBTCompression detect(InputStream is)
is - The input stream to check the compression of.UNCOMPRESSED if not recognized.Copyright © 2016. All rights reserved.