public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(BigInteger value,
BigInteger minValue) |
static void |
checkArgument(BigInteger value,
BigInteger minValue,
BigInteger maxValue) |
static void |
checkArgument(byte[] value,
int length) |
static void |
checkArgument(int value,
int minValue) |
static void |
checkArgument(int value,
int minValue,
int maxValue) |
static void |
checkArgument(long value,
long minValue) |
static void |
checkArgument(long value,
long minValue,
long maxValue) |
static long |
copy(InputStream from,
OutputStream to) |
static int |
getVarIntSize(int value) |
static int |
getVarLongSize(long value) |
static boolean |
isNullOrEmptyString(String str) |
static List<Object> |
listOf(Object... values) |
static Map<Object,Object> |
mapOf(Object... kvps) |
static BigInteger |
readBigInteger(DataInputStream inputStream,
int byteLength) |
static void |
readFully(DataInputStream in,
byte[] b) |
static void |
readFully(DataInputStream in,
byte[] b,
int off,
int len) |
static int |
readInt(DataInputStream inputStream) |
static long |
readLong(DataInputStream inputStream) |
static BigInteger |
readLongAsBigInteger(DataInputStream inputStream) |
static int |
readUnsignedLeb128(DataInputStream inputStream) |
static int |
readUnsignedShort(DataInputStream inputStream) |
static int |
readVarInt(ByteBuffer buffer) |
static int |
readVarInt(DataInput in) |
static String |
retainUnquoted(String haystack,
char quoteChar) |
static boolean |
startsWithIgnoreCase(String haystack,
String pattern) |
static BigInteger |
toBigInteger(BigDecimal num,
int scale) |
static byte[] |
toByteArray(InputStream in) |
static String |
toString(InputStream in) |
static <T> Class<T> |
unwrap(Class<T> type) |
static void |
writeBigInteger(DataOutputStream outputStream,
BigInteger value,
int byteLength) |
static void |
writeInt(DataOutputStream outputStream,
int value) |
static void |
writeLong(DataOutputStream outputStream,
long value) |
static void |
writeShort(DataOutputStream outputStream,
int value) |
static void |
writeVarInt(int value,
ByteBuffer buffer) |
public static String toString(InputStream in) throws IOException
IOExceptionpublic static byte[] toByteArray(InputStream in) throws IOException
IOExceptionpublic static long copy(InputStream from, OutputStream to) throws IOException
IOExceptionpublic static boolean isNullOrEmptyString(String str)
public static void checkArgument(byte[] value,
int length)
public static void checkArgument(int value,
int minValue)
public static void checkArgument(long value,
long minValue)
public static void checkArgument(int value,
int minValue,
int maxValue)
public static void checkArgument(long value,
long minValue,
long maxValue)
public static void checkArgument(BigInteger value, BigInteger minValue)
public static void checkArgument(BigInteger value, BigInteger minValue, BigInteger maxValue)
public static void readFully(DataInputStream in, byte[] b) throws IOException
IOExceptionpublic static void readFully(DataInputStream in, byte[] b, int off, int len) throws IOException
IOExceptionpublic static int readUnsignedShort(DataInputStream inputStream) throws IOException
IOExceptionpublic static int readInt(DataInputStream inputStream) throws IOException
IOExceptionpublic static long readLong(DataInputStream inputStream) throws IOException
IOExceptionpublic static BigInteger readLongAsBigInteger(DataInputStream inputStream) throws IOException
IOExceptionpublic static int readUnsignedLeb128(DataInputStream inputStream) throws IOException
IOExceptionpublic static BigInteger readBigInteger(DataInputStream inputStream, int byteLength) throws IOException
IOExceptionpublic static void writeShort(DataOutputStream outputStream, int value) throws IOException
IOExceptionpublic static void writeInt(DataOutputStream outputStream, int value) throws IOException
IOExceptionpublic static void writeLong(DataOutputStream outputStream, long value) throws IOException
IOExceptionpublic static void writeBigInteger(DataOutputStream outputStream, BigInteger value, int byteLength) throws IOException
IOExceptionpublic static int getVarIntSize(int value)
public static int getVarLongSize(long value)
public static void writeVarInt(int value,
ByteBuffer buffer)
public static int readVarInt(DataInput in) throws IOException
IOExceptionpublic static int readVarInt(ByteBuffer buffer)
public static BigInteger toBigInteger(BigDecimal num, int scale)
Copyright © 2015–2021 ClickHouse. All rights reserved.