• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/java/src/com/sleepycat/util/

Lines Matching refs:bytes

26      * @param bytes the data containing the UTF string.
32 * @return the number of bytes.
34 public static int getZeroTerminatedByteLength(byte[] bytes, int offset)
38 while (bytes[offset++] != 0) {
89 * @param bytes the UTF string.
99 public static int getCharLength(byte[] bytes)
102 return getCharLength(bytes, 0, bytes.length);
108 * @param bytes the data containing the UTF string.
120 public static int getCharLength(byte[] bytes, int offset, int length)
126 switch ((bytes[offset] & 0xff) >> 4) {
147 * @param bytes the source byte data to convert
158 * @param isByteLen if true then len is a measure of bytes, otherwise
167 public static int bytesToChars(byte[] bytes, int byteOffset,
175 char1 = bytes[byteOffset++] & 0xff;
181 char2 = bytes[byteOffset++];
189 char2 = bytes[byteOffset++];
190 char3 = bytes[byteOffset++];
212 * @param bytes the destination array
214 * @param byteOffset the offset into bytes at which to begin the copy
216 * @param charLength the length of characters to copy into bytes
219 byte[] bytes, int byteOffset,
225 bytes[byteOffset++] = (byte) c;
227 bytes[byteOffset++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
228 bytes[byteOffset++] = (byte) (0x80 | ((c >> 6) & 0x3F));
229 bytes[byteOffset++] = (byte) (0x80 | ((c >> 0) & 0x3F));
231 bytes[byteOffset++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
232 bytes[byteOffset++] = (byte) (0x80 | ((c >> 0) & 0x3F));
240 * @param bytes the source byte data to convert
245 * @param length the number of bytes to be converted.
255 public static String bytesToString(byte[] bytes, int offset, int length)
259 int charLen = UtfOps.getCharLength(bytes, offset, length);
261 UtfOps.bytesToChars(bytes, offset, chars, 0, length, true);
276 byte[] bytes = new byte[UtfOps.getByteLength(chars)];
277 UtfOps.charsToBytes(chars, 0, bytes, 0, chars.length);
278 return bytes;