ru.yandex.clickhouse.util

## Class Utils

- java.lang.Object
- - ru.yandex.clickhouse.util.Utils

    public class Utils
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`Utils()`

### Method Summary

All Methods Static Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Utils

    public Utils()

### Method Detail

#### unwrap

    public static <T> Class<T> unwrap(Class<T> type)

#### mapOf

    public static Map<Object,Object> mapOf(Object... kvps)

#### listOf

    public static List<Object> listOf(Object... values)

#### toString

    public static String toString(InputStream in)
                           throws IOException

Throws:
  `IOException`

#### toByteArray

    public static byte[] toByteArray(InputStream in)
                              throws IOException

Throws:
  `IOException`

#### copy

    public static long copy(InputStream from,
                            OutputStream to)
                     throws IOException

Throws:
  `IOException`

#### isNullOrEmptyString

    public static boolean isNullOrEmptyString(String str)

#### checkArgument

    public static void checkArgument(byte[] value,
                                     int length)

#### checkArgument

    public static void checkArgument(int value,
                                     int minValue)

#### checkArgument

    public static void checkArgument(long value,
                                     long minValue)

#### checkArgument

    public static void checkArgument(int value,
                                     int minValue,
                                     int maxValue)

#### checkArgument

    public static void checkArgument(long value,
                                     long minValue,
                                     long maxValue)

#### checkArgument

    public static void checkArgument(BigInteger value,
                                     BigInteger minValue)

#### checkArgument

    public static void checkArgument(BigInteger value,
                                     BigInteger minValue,
                                     BigInteger maxValue)

#### readFully

    public static void readFully(DataInputStream in,
                                 byte[] b)
                          throws IOException

Throws:
  `IOException`

#### readFully

    public static void readFully(DataInputStream in,
                                 byte[] b,
                                 int off,
                                 int len)
                          throws IOException

Throws:
  `IOException`

#### readUnsignedShort

    public static int readUnsignedShort(DataInputStream inputStream)
                                 throws IOException

Throws:
  `IOException`

#### readInt

    public static int readInt(DataInputStream inputStream)
                       throws IOException

Throws:
  `IOException`

#### readLong

    public static long readLong(DataInputStream inputStream)
                         throws IOException

Throws:
  `IOException`

#### readLongAsBigInteger

    public static BigInteger readLongAsBigInteger(DataInputStream inputStream)
                                           throws IOException

Throws:
  `IOException`

#### readUnsignedLeb128

    public static int readUnsignedLeb128(DataInputStream inputStream)
                                  throws IOException

Throws:
  `IOException`

#### readBigInteger

    public static BigInteger readBigInteger(DataInputStream inputStream,
                                            int byteLength)
                                     throws IOException

Throws:
  `IOException`

#### writeShort

    public static void writeShort(DataOutputStream outputStream,
                                  int value)
                           throws IOException

Throws:
  `IOException`

#### writeInt

    public static void writeInt(DataOutputStream outputStream,
                                int value)
                         throws IOException

Throws:
  `IOException`

#### writeLong

    public static void writeLong(DataOutputStream outputStream,
                                 long value)
                          throws IOException

Throws:
  `IOException`

#### writeBigInteger

    public static void writeBigInteger(DataOutputStream outputStream,
                                       BigInteger value,
                                       int byteLength)
                                throws IOException

Throws:
  `IOException`

#### getVarIntSize

    public static int getVarIntSize(int value)

#### getVarLongSize

    public static int getVarLongSize(long value)

#### writeVarInt

    public static void writeVarInt(int value,
                                   ByteBuffer buffer)

#### readVarInt

    public static int readVarInt(DataInput in)
                          throws IOException

Throws:
  `IOException`

#### readVarInt

    public static int readVarInt(ByteBuffer buffer)

#### toBigInteger

    public static BigInteger toBigInteger(BigDecimal num,
                                          int scale)

#### startsWithIgnoreCase

    public static boolean startsWithIgnoreCase(String haystack,
                                               String pattern)

#### retainUnquoted

    public static String retainUnquoted(String haystack,
                                        char quoteChar)