- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 166 for ByteArrayInputStream (0.7 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) -
platforms/software/resources/src/main/java/org/gradle/internal/resource/local/ByteArrayReadableContent.java
* limitations under the License. */ package org.gradle.internal.resource.local; import org.gradle.internal.resource.ReadableContent; import java.io.ByteArrayInputStream; import java.io.InputStream; public class ByteArrayReadableContent implements ReadableContent { private final byte[] source; public ByteArrayReadableContent(byte[] source) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 12 19:38:08 UTC 2023 - 1.1K bytes - Viewed (0) -
platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/stream/EncodedStreamTest.groovy
def outputStream = new ByteArrayOutputStream() def encoder = new EncodedStream.EncodedOutput(outputStream) when: encoder.flush() then: def inputStream = new ByteArrayInputStream(outputStream.toByteArray()) def decoder = new EncodedStream.EncodedInput(inputStream) decoder.read() < 0 } def "can encode and decode a string"() {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:59:22 UTC 2023 - 2.2K bytes - Viewed (0)