public enum BytesUtil extends Enum<BytesUtil>
Modifier and Type | Method and Description |
---|---|
static void |
appendBytesFromStart(@NotNull Bytes bytes,
long startPosition,
@NotNull StringBuilder sb) |
static void |
appendUtf8(@NotNull StreamingDataOutput out,
@NotNull CharSequence cs) |
static int |
asInt(@NotNull String str) |
static boolean |
bytesEqual(@Nullable CharSequence cs,
@NotNull RandomDataInput bs,
long offset,
int length) |
static boolean |
bytesEqual(@NotNull RandomDataInput a,
long offset,
@NotNull RandomDataInput second,
long secondOffset,
long len) |
static boolean |
byteToBoolean(byte b) |
static void |
checkRegisteredBytes() |
static boolean |
equals(Object o1,
Object o2) |
static String |
findFile(@NotNull String name) |
static void |
parseUtf8(@NotNull StreamingDataInput in,
Appendable appendable,
int utflen) |
static void |
read8ByteAlignPadding(Bytes<?> bytes) |
static Bytes |
readFile(@NotNull String name) |
static void |
readMarshallable(@NotNull ReadBytesMarshallable marshallable,
BytesIn bytes) |
static long |
readStopBit(@NotNull StreamingDataInput in) |
static boolean |
register(AbstractBytes bytes) |
static long |
roundUpTo64ByteAlign(long x) |
static long |
roundUpTo8ByteAlign(long x) |
static int |
stopBitLength(long n) |
static @NotNull char[] |
toCharArray(@NotNull Bytes bytes) |
static @NotNull char[] |
toCharArray(@NotNull Bytes bytes,
long position,
int length) |
static String |
toDebugString(@NotNull RandomDataInput bytes,
long start,
long maxLength) |
static boolean |
unregister(Bytes bytes) |
static boolean |
unregister(BytesStore bytes) |
static long |
utf8Length(@NotNull CharSequence toWrite)
Deprecated.
|
static BytesUtil |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BytesUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static void |
write8ByteAlignPadding(Bytes<?> bytes) |
static void |
writeFile(String file,
Bytes<byte[]> bytes) |
static void |
writeMarshallable(@NotNull WriteBytesMarshallable marshallable,
BytesOut bytes) |
static void |
writeStopBit(@NotNull StreamingDataOutput out,
long n) |
public static BytesUtil[] values()
for (BytesUtil c : BytesUtil.values()) System.out.println(c);
public static BytesUtil 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 static String findFile(@NotNull @NotNull String name) throws FileNotFoundException
FileNotFoundException
public static Bytes readFile(@NotNull @NotNull String name) throws IOException
IOException
public static void writeFile(String file, Bytes<byte[]> bytes) throws IOException
IOException
public static boolean bytesEqual(@NotNull @NotNull RandomDataInput a, long offset, @NotNull @NotNull RandomDataInput second, long secondOffset, long len) throws BufferUnderflowException
BufferUnderflowException
public static boolean bytesEqual(@Nullable @Nullable CharSequence cs, @NotNull @NotNull RandomDataInput bs, long offset, int length)
public static int asInt(@NotNull @NotNull String str)
public static int stopBitLength(long n)
@NotNull public static @NotNull char[] toCharArray(@NotNull @NotNull Bytes bytes)
@NotNull public static @NotNull char[] toCharArray(@NotNull @NotNull Bytes bytes, long position, int length)
public static long readStopBit(@NotNull @NotNull StreamingDataInput in) throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeException
public static void writeStopBit(@NotNull @NotNull StreamingDataOutput out, long n)
public static void parseUtf8(@NotNull @NotNull StreamingDataInput in, Appendable appendable, int utflen) throws UTFDataFormatRuntimeException
UTFDataFormatRuntimeException
public static void appendUtf8(@NotNull @NotNull StreamingDataOutput out, @NotNull @NotNull CharSequence cs)
public static void appendBytesFromStart(@NotNull @NotNull Bytes bytes, long startPosition, @NotNull @NotNull StringBuilder sb)
public static void readMarshallable(@NotNull @NotNull ReadBytesMarshallable marshallable, BytesIn bytes)
public static void writeMarshallable(@NotNull @NotNull WriteBytesMarshallable marshallable, BytesOut bytes)
@Deprecated public static long utf8Length(@NotNull @NotNull CharSequence toWrite)
public static boolean register(AbstractBytes bytes)
public static void checkRegisteredBytes()
public static boolean unregister(BytesStore bytes)
public static boolean unregister(Bytes bytes)
public static boolean byteToBoolean(byte b)
public static long roundUpTo64ByteAlign(long x)
public static long roundUpTo8ByteAlign(long x)
public static void read8ByteAlignPadding(Bytes<?> bytes)
public static void write8ByteAlignPadding(Bytes<?> bytes)
public static String toDebugString(@NotNull @NotNull RandomDataInput bytes, long start, long maxLength)
Copyright © 2020. All rights reserved.