@Private
public class CryptoStreamUtils
extends java.lang.Object
| Constructor | Description |
|---|---|
CryptoStreamUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
checkBufferSize(CryptoCodec codec,
int bufferSize) |
Check and floor buffer size.
|
static void |
checkCodec(CryptoCodec codec) |
AES/CTR/NoPadding or SM4/CTR/NoPadding is required.
|
static void |
freeDB(java.nio.ByteBuffer buffer) |
Forcibly free the direct buffer.
|
static int |
getBufferSize(Configuration conf) |
Read crypto buffer size.
|
static long |
getInputStreamOffset(java.io.InputStream in) |
If input stream is
Seekable, return it's
current position, otherwise return 0; |
public static void freeDB(java.nio.ByteBuffer buffer)
buffer - buffer.public static int getBufferSize(Configuration conf)
conf - configuration.public static void checkCodec(CryptoCodec codec)
codec - crypto codec.public static int checkBufferSize(CryptoCodec codec, int bufferSize)
codec - crypto codec.bufferSize - the size of the buffer to be used.public static long getInputStreamOffset(java.io.InputStream in)
throws java.io.IOException
Seekable, return it's
current position, otherwise return 0;in - wrapper.java.io.IOException - raised on errors performing I/O.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.