public class UTFUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
NULL_STRING_UTF_VALUE |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
fromAsciiByteArray(@NotNull byte[] bytes,
int off,
int len) |
static int |
getUtfByteLength(@NotNull java.lang.String value) |
static @Nullable java.lang.String |
readUTF(@NotNull java.io.InputStream stream)
Reads a string from input stream saved as a sequence of UTF chunks.
|
static void |
utfCharsToBytes(@NotNull java.lang.String value,
byte[] bytes,
int offset) |
static void |
writeUTF(@NotNull java.io.OutputStream stream,
@NotNull java.lang.String str)
Writes long strings to output stream as several chunks.
|
public static final int NULL_STRING_UTF_VALUE
public static void writeUTF(@NotNull
@NotNull java.io.OutputStream stream,
@NotNull
@NotNull java.lang.String str)
throws java.io.IOException
stream - stream to write to.str - string to be written.java.io.IOException - if something went wrong@Nullable
public static @Nullable java.lang.String readUTF(@NotNull
@NotNull java.io.InputStream stream)
throws java.io.IOException
stream - stream to read from.java.io.IOException - if something went wrongpublic static java.lang.String fromAsciiByteArray(@NotNull
@NotNull byte[] bytes,
int off,
int len)
public static int getUtfByteLength(@NotNull
@NotNull java.lang.String value)
public static void utfCharsToBytes(@NotNull
@NotNull java.lang.String value,
byte[] bytes,
int offset)