public final class Bytes extends Object
byte primitives.
jupiter
org.jupiter.common.util| 构造器和说明 |
|---|
Bytes() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
bytes2Int(byte[] bytes,
int start,
int length)
Returns a int by decoding the specified sub array of bytes.
|
static String |
bytes2String(byte[] bytes,
int start,
int length)
Constructs a new
String by decoding the specified sub array of
bytes using the platform's default charset. |
static boolean |
contains(byte[] array,
byte target)
Returns
true if target is present as an element anywhere
in array. |
static byte[] |
int2Bytes(int value,
int length)
Encodes this
int into a sequence of bytes, storing the result
into a new byte array. |
static byte[] |
replace(byte[] originalBytes,
int offset,
int length,
byte[] replaceBytes)
Replaces bytes in the specified sub array.
|
static byte[] |
string2Bytes(String str)
Encodes this
String into a sequence of bytes using the
platform's default charset, storing the result into a new byte array. |
public static int bytes2Int(byte[] bytes,
int start,
int length)
public static byte[] int2Bytes(int value,
int length)
int into a sequence of bytes, storing the result
into a new byte array.public static String bytes2String(byte[] bytes, int start, int length)
String by decoding the specified sub array of
bytes using the platform's default charset.public static byte[] string2Bytes(String str)
String into a sequence of bytes using the
platform's default charset, storing the result into a new byte array.public static byte[] replace(byte[] originalBytes,
int offset,
int length,
byte[] replaceBytes)
public static boolean contains(byte[] array,
byte target)
true if target is present as an element anywhere
in array.Copyright © 2018. All rights reserved.