- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 48 for decoder (0.17 sec)
-
guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
// otherwise try to presize a StringBuilder // it is kind of lame that we need to construct a decoder to access this value. // if this is a concern we could add special cases for some known charsets (like utf8) // or we could avoid inputstreamreader and use the decoder api directly // TODO(lukes): in a real implementation we would need to handle overflow conditions
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 5.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
// otherwise try to presize a StringBuilder // it is kind of lame that we need to construct a decoder to access this value. // if this is a concern we could add special cases for some known charsets (like utf8) // or we could avoid inputstreamreader and use the decoder api directly // TODO(lukes): in a real implementation we would need to handle overflow conditions
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 5.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Utf8.java
/** * Returns {@code true} if {@code bytes} is a <i>well-formed</i> UTF-8 byte sequence according to * Unicode 6.0. Note that this is a stronger criterion than simply whether the bytes can be * decoded. For example, some versions of the JDK decoder will accept "non-shortest form" byte * sequences, but encoding never reproduces these. Such byte sequences are <i>not</i> considered * well-formed. *
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 10 14:11:51 GMT 2023 - 7K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Utf8.java
/** * Returns {@code true} if {@code bytes} is a <i>well-formed</i> UTF-8 byte sequence according to * Unicode 6.0. Note that this is a stronger criterion than simply whether the bytes can be * decoded. For example, some versions of the JDK decoder will accept "non-shortest form" byte * sequences, but encoding never reproduces these. Such byte sequences are <i>not</i> considered * well-formed. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 10 14:11:51 GMT 2023 - 7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/BaseEncodingBenchmark.java
tmp += System.identityHashCode(encoding.encoding.encode(encodingInputs[i & INPUTS_MASK])); } return tmp; } @Benchmark public int decode(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { tmp += System.identityHashCode(encoding.encoding.decode(decodingInputs[i & INPUTS_MASK])); } return tmp; } @Benchmark public int encodingStream(int reps) throws IOException {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.2K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashCode.java
byte[] bytes = new byte[string.length() / 2]; for (int i = 0; i < string.length(); i += 2) { int ch1 = decode(string.charAt(i)) << 4; int ch2 = decode(string.charAt(i + 1)); bytes[i / 2] = (byte) (ch1 + ch2); } return fromBytesNoCopy(bytes); } private static int decode(char ch) { if (ch >= '0' && ch <= '9') { return ch - '0'; } if (ch >= 'a' && ch <= 'f') {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 20 18:43:59 GMT 2021 - 12.6K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/UnicodeEscaper.java
* thrown. * </ol> * * @param seq the sequence of characters from which to decode the code point * @param index the index of the first character to decode * @param end the index beyond the last valid character to decode * @return the Unicode code point for the given index or the negated value of the trailing high * surrogate character at the end of the sequence
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Jan 18 20:55:09 GMT 2022 - 13.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Files.java
* * <p><b>{@link java.nio.file.Path} equivalent:</b> {@link * java.nio.file.Files#newBufferedReader(java.nio.file.Path, Charset)}. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link StandardCharsets} for * helpful predefined constants * @return the buffered reader */ public static BufferedReader newReader(File file, Charset charset) throws FileNotFoundException {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 33.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashCodeTest.java
} public void testRoundTripHashCodeUsingBaseEncoding() { HashCode hash1 = Hashing.sha1().hashString("foo", Charsets.US_ASCII); HashCode hash2 = HashCode.fromBytes(BaseEncoding.base16().lowerCase().decode(hash1.toString())); assertEquals(hash1, hash2); } public void testObjectHashCode() { HashCode hashCode42 = HashCode.fromInt(42); assertEquals(42, hashCode42.hashCode()); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Ints.java
/** * Returns a serializable converter object that converts between strings and integers using {@link * Integer#decode} and {@link Integer#toString()}. The returned converter throws {@link * NumberFormatException} if the input string is invalid. * * <p><b>Warning:</b> please see {@link Integer#decode} to understand exactly how strings are
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 29.7K bytes - Viewed (0)