- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for slice (0.16 sec)
-
android/guava-tests/test/com/google/common/io/ByteSourceTest.java
* the offset at which the slice is supposed to start. */ // TODO(cgdecker): Maybe add a test for this to ByteSourceTester public void testSlice_appendingAfterSlicing() throws IOException { // Source of length 5 AppendableByteSource source = new AppendableByteSource(newPreFilledByteArray(5)); // Slice it starting at offset 10. ByteSource slice = source.slice(10, 5);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
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) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 8.6K bytes - Viewed (0) -
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) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 8.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
* the offset at which the slice is supposed to start. */ // TODO(cgdecker): Maybe add a test for this to ByteSourceTester public void testSlice_appendingAfterSlicing() throws IOException { // Source of length 5 AppendableByteSource source = new AppendableByteSource(newPreFilledByteArray(5)); // Slice it starting at offset 10. ByteSource slice = source.slice(10, 5);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
} /** * Returns a view of a slice of this byte source that is at most {@code length} bytes long * starting at the given {@code offset}. If {@code offset} is greater than the size of this * source, the returned source will be empty. If {@code offset + length} is greater than the size * of this source, the returned source will contain the slice starting at {@code offset} and * ending at the end of this source.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 26.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharSourceTest.java
CharSource concatenated = CharSource.concat(cycle); String expected = "abcdabcd"; // read the first 8 chars manually, since there's no equivalent to ByteSource.slice // TODO(cgdecker): Add CharSource.slice? StringBuilder builder = new StringBuilder(); Reader reader = concatenated.openStream(); // no need to worry about closing for (int i = 0; i < 8; i++) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13K 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; }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 6.8K bytes - Viewed (0) -
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; }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 7.3K 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")) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 5.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/Quantiles.java
from = partitionPoint + 1; } } } /** * Performs a partition operation on the slice of {@code array} with elements in the range [{@code * from}, {@code to}]. Uses the median of {@code from}, {@code to}, and the midpoint between them * as a pivot. Returns the index which the slice is partitioned around, i.e. if it returns {@code
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 12 17:02:53 GMT 2023 - 29.9K bytes - Viewed (0)