- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for slice (0.1 sec)
-
android/guava-tests/test/com/google/common/io/ByteSourceTester.java
public void testSlice_constrainedRange() throws IOException { long size = source.read().length; if (size >= 2) { ByteSource sliced = source.slice(1, size - 2); assertEquals(size - 2, sliced.read().length); ByteSource resliced = sliced.slice(0, size - 1); assertTrue(sliced.contentEquals(resliced)); } } private void assertExpectedBytes(byte[] readBytes) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 8.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTester.java
TestSuite suite = suiteForString(factory, new String(bytes, Charsets.UTF_8), name, desc); ByteSourceFactory byteSourceFactory = SourceSinkFactories.asByteSourceFactory(factory); suite.addTest( ByteSourceTester.suiteForBytes( byteSourceFactory, bytes, name + ".asByteSource[Charset]", desc, slice)); return suite; }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 6.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte); assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source)); } File file = out.getFile(); assertNull(file); // Write data to go over the threshold if (chunk2 > 0) { if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 5.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte); assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source)); } File file = out.getFile(); assertNull(file); // Write data to go over the threshold if (chunk2 > 0) { if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 5.5K bytes - Viewed (0) -
guava/src/com/google/common/base/Utf8.java
*/ public static boolean isWellFormed(byte[] bytes) { return isWellFormed(bytes, 0, bytes.length); } /** * Returns whether the given byte array slice is a well-formed UTF-8 byte sequence, as defined by * {@link #isWellFormed(byte[])}. Note that this can be false even when {@code * isWellFormed(bytes)} is true. * * @param bytes the input buffer
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 10 14:11:51 UTC 2023 - 7K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Utf8.java
*/ public static boolean isWellFormed(byte[] bytes) { return isWellFormed(bytes, 0, bytes.length); } /** * Returns whether the given byte array slice is a well-formed UTF-8 byte sequence, as defined by * {@link #isWellFormed(byte[])}. Note that this can be false even when {@code * isWellFormed(bytes)} is true. * * @param bytes the input buffer
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 10 14:11:51 UTC 2023 - 7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/SourceSinkFactory.java
* the source or written to the sink. Typically, this will just return the input directly, but in * some cases it may alter the input. For example, if the factory returns a sliced view of a * source created with some given bytes, this method would return a subsequence of the given * (byte[]) data. */ T getExpected(T data);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3K bytes - Viewed (0) -
android/guava/src/com/google/common/graph/MapRetrievalCache.java
cacheEntry1 = null; cacheEntry2 = null; } private void addToCache(K key, V value) { addToCache(new CacheEntry<K, V>(key, value)); } private void addToCache(CacheEntry<K, V> entry) { // Slide new entry into first cache position. Drop previous entry in second cache position. cacheEntry2 = cacheEntry1; cacheEntry1 = entry; } private static final class CacheEntry<K, V> { final K key;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 26 17:43:39 UTC 2021 - 3.2K bytes - Viewed (0) -
guava/src/com/google/common/graph/MapRetrievalCache.java
cacheEntry1 = null; cacheEntry2 = null; } private void addToCache(K key, V value) { addToCache(new CacheEntry<K, V>(key, value)); } private void addToCache(CacheEntry<K, V> entry) { // Slide new entry into first cache position. Drop previous entry in second cache position. cacheEntry2 = cacheEntry1; cacheEntry1 = entry; } private static final class CacheEntry<K, V> { final K key;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 26 17:43:39 UTC 2021 - 3.2K bytes - Viewed (0)