/external/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | IsValidUtf8TestUtil.java | 285 int state1 = Utf8.partialIsValidUtf8(Utf8.COMPLETE, bytes, 0, i); 286 int state2 = Utf8.partialIsValidUtf8(state1, bytes, i, j); 287 int state3 = Utf8.partialIsValidUtf8(state2, bytes, j, numBytes); 303 assertEquals(state3, x.partialIsValidUtf8(Utf8.COMPLETE, 0, numBytes)); 305 assertEquals(state1, x.partialIsValidUtf8(Utf8.COMPLETE, 0, i)); 306 assertEquals(state1, x.substring(0, i).partialIsValidUtf8(Utf8.COMPLETE, 0, i)); 307 assertEquals(state2, x.partialIsValidUtf8(state1, i, j - i)); 308 assertEquals(state2, x.substring(i, j).partialIsValidUtf8(state1, 0, j - i)); 309 assertEquals(state3, x.partialIsValidUtf8(state2, j, numBytes - j)); 310 assertEquals(state3, x.substring(j, numBytes).partialIsValidUtf8(state2, 0, numBytes - j));
|
/external/protobuf/java/core/src/main/java/com/google/protobuf/ |
D | Utf8.java | 189 public static int partialIsValidUtf8(int state, byte[] bytes, int index, int limit) { in partialIsValidUtf8() method in Utf8 190 return processor.partialIsValidUtf8(state, bytes, index, limit); in partialIsValidUtf8() 333 static int partialIsValidUtf8(int state, ByteBuffer buffer, int index, int limit) { in partialIsValidUtf8() method in Utf8 334 return processor.partialIsValidUtf8(state, buffer, index, limit); in partialIsValidUtf8() 387 return partialIsValidUtf8(COMPLETE, bytes, index, limit) == COMPLETE; in isValidUtf8() 408 abstract int partialIsValidUtf8(int state, byte[] bytes, int index, int limit); in partialIsValidUtf8() method in Utf8.Processor 420 return partialIsValidUtf8(COMPLETE, buffer, index, limit) == COMPLETE; in isValidUtf8() 429 final int partialIsValidUtf8( in partialIsValidUtf8() method in Utf8.Processor 433 return partialIsValidUtf8(state, buffer.array(), offset + index, offset + limit); in partialIsValidUtf8() 538 return partialIsValidUtf8(buffer, index, limit); in partialIsValidUtf8Default() [all …]
|
D | RopeByteString.java | 419 int leftPartial = left.partialIsValidUtf8(Utf8.COMPLETE, 0, leftLength); in isValidUtf8() 420 int state = right.partialIsValidUtf8(leftPartial, 0, right.size()); in isValidUtf8() 425 protected int partialIsValidUtf8(int state, int offset, int length) { in partialIsValidUtf8() method in RopeByteString 428 return left.partialIsValidUtf8(state, offset, length); in partialIsValidUtf8() 430 return right.partialIsValidUtf8(state, offset - leftLength, length); in partialIsValidUtf8() 433 int leftPartial = left.partialIsValidUtf8(state, offset, leftLength); in partialIsValidUtf8() 434 return right.partialIsValidUtf8(leftPartial, 0, length - leftLength); in partialIsValidUtf8()
|
D | NioByteString.java | 181 protected int partialIsValidUtf8(int state, int offset, int length) { in partialIsValidUtf8() method in NioByteString 182 return Utf8.partialIsValidUtf8(state, buffer, offset, offset + length); in partialIsValidUtf8()
|
D | ByteString.java | 801 protected abstract int partialIsValidUtf8(int state, int offset, int length); in partialIsValidUtf8() method 1341 protected final int partialIsValidUtf8(int state, int offset, int length) { in partialIsValidUtf8() method in LiteralByteString 1343 return Utf8.partialIsValidUtf8(state, bytes, index, index + length); in partialIsValidUtf8()
|