- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 203 for ByteArrayInputStream (0.56 sec)
-
platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/ApacheDirectoryListingParserTest.groovy
def encodedHtml = html.getBytes('utf-8') expect: def uris = parser.parse(baseUrl, new ByteArrayInputStream(encodedHtml), 'text/html') uris.collect { it.toString() } == ["\u0321\u0322"] } def "parse ignores #descr"() { expect: parser.parse(baseUrl, new ByteArrayInputStream(href.bytes), CONTENT_TYPE).isEmpty() where:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 7.2K bytes - Viewed (0) -
platforms/core-runtime/io/src/test/groovy/org/gradle/internal/io/StreamByteBufferTest.groovy
} def "reads source InputStream fully"() { given: def byteBuffer = new StreamByteBuffer() def byteArrayInputStream = new ByteArrayInputStream(testbuffer) when: byteBuffer.readFully(byteArrayInputStream) then: byteBuffer.totalBytesUnread() == testbuffer.length byteBuffer.readAsByteArray() == testbuffer }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 12 13:06:08 UTC 2024 - 13.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java
DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data)); byte[] b = new byte[data.length]; in.readFully(b); assertEquals(Bytes.asList(data), Bytes.asList(b)); } public void testReadUnsignedByte_eof() throws IOException { DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(new byte[0])); assertThrows(EOFException.class, () -> in.readUnsignedByte());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 4.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
byte[] bytes = newPreFilledByteArray(100); skipHelper(0, 0, new ByteArrayInputStream(bytes)); skipHelper(50, 50, new ByteArrayInputStream(bytes)); skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 1)); skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 0)); skipHelper(100, -1, new ByteArrayInputStream(bytes));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 21.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSinkTest.java
ByteArrayInputStream in = new ByteArrayInputStream(bytes); sink.writeFrom(in); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertArrayEquals(bytes, sink.getBytes()); } public void testWriteFromStream_doesNotCloseThatStream() throws IOException { TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10])); assertFalse(in.closed());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTest.java
ByteArrayInputStream in = new ByteArrayInputStream(bytes); sink.writeFrom(in); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertArrayEquals(bytes, sink.getBytes()); } public void testWriteFromStream_doesNotCloseThatStream() throws IOException { TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10])); assertFalse(in.closed());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
maven-model/src/test/java/org/apache/maven/model/SerializationTest.java
try (ObjectOutputStream oos = new ObjectOutputStream(baos)) { oos.writeObject(build); } Build build2; ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); try (ObjectInputStream ois = new ObjectInputStream(bais)) { build2 = (Build) ois.readObject(); } assertNotNull(build2); }
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Fri Mar 01 16:30:18 UTC 2024 - 2.5K bytes - Viewed (0) -
platforms/core-execution/build-cache-packaging/src/test/groovy/org/gradle/caching/internal/packaging/impl/TarBuildCacheEntryPackerTest.groovy
when: def packResult = pack output, prop(DIRECTORY, sourceOutputDir) then: packResult.entries == 4 when: def input = new ByteArrayInputStream(output.toByteArray()) def result = unpack input, prop(DIRECTORY, targetOutputDir) then: targetDataFile.text == "output" result.entries == 4 }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:43:12 UTC 2023 - 9.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSinkTester.java
try { ByteStreams.copy(new ByteArrayInputStream(data), out); } finally { out.close(); } assertContainsExpectedBytes(); } public void testOpenBufferedStream() throws IOException { OutputStream out = sink.openBufferedStream(); try { ByteStreams.copy(new ByteArrayInputStream(data), out); } finally { out.close(); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 4K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/process/internal/streams/SafeStreams.java
import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; public class SafeStreams { public static OutputStream systemErr() { return CloseShieldOutputStream.wrap(System.err); } public static InputStream emptyInput() { return new ByteArrayInputStream(new byte[0]); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Mar 22 09:47:12 UTC 2022 - 1.1K bytes - Viewed (0)