public class BytesSource extends Source
compressedSize, compressionFlag, crc, uncompressedSize| Constructor and Description |
|---|
BytesSource(byte[] bytes,
java.lang.String name,
int compressionLevel) |
BytesSource(java.io.File file,
java.lang.String name,
int compressionLevel) |
BytesSource(java.io.InputStream stream,
java.lang.String name,
int compressionLevel) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
getBuffer() |
public BytesSource(@NonNull
byte[] bytes,
@NonNull
java.lang.String name,
int compressionLevel)
throws java.io.IOException
bytes - name - compressionLevel - One of java.util.zip.Deflater compression level.java.io.IOExceptionpublic BytesSource(@NonNull
java.io.File file,
@NonNull
java.lang.String name,
int compressionLevel)
throws java.io.IOException
java.io.IOExceptionpublic BytesSource(@NonNull
java.io.InputStream stream,
@NonNull
java.lang.String name,
int compressionLevel)
throws java.io.IOException
stream - BytesSource takes ownership of the InputStream and will close it after draining
it.name - compressionLevel - java.io.IOException