Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for ByteStreams (0.08 sec)

  1. guava/src/com/google/common/io/ByteStreams.java

     *
     * @author Chris Nokleberg
     * @author Colin Decker
     * @since 1.0
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public final class ByteStreams {
    
      private static final int BUFFER_SIZE = 8192;
    
      /** Creates a new byte array for buffering reads or writes. */
      static byte[] createBuffer() {
        return new byte[BUFFER_SIZE];
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/ByteSource.java

    package com.google.common.io;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.io.ByteStreams.createBuffer;
    import static com.google.common.io.ByteStreams.skipUpTo;
    import static java.lang.Math.min;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Ascii;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/TestWriter.java

    /** @author Colin Decker */
    public class TestWriter extends FilterWriter {
    
      private final TestOutputStream out;
    
      public TestWriter(TestOption... options) throws IOException {
        this(new TestOutputStream(ByteStreams.nullOutputStream(), options));
      }
    
      public TestWriter(TestOutputStream out) {
        super(new OutputStreamWriter(checkNotNull(out), UTF_8));
        this.out = out;
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/ByteSinkTester.java

        OutputStream out = sink.openStream();
        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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteSinkTester.java

        OutputStream out = sink.openStream();
        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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/ByteSourceTester.java

        InputStream in = source.openStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/ByteSourceTest.java

        InputStream in = source.openBufferedStream();
        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteStreams.copy(in, out);
        in.close();
        out.close();
    
        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
      public void testSize() throws IOException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

        throw new UnsupportedOperationException("readLine is not supported");
      }
    
      @Override
      public void readFully(byte[] b) throws IOException {
        ByteStreams.readFully(this, b);
      }
    
      @Override
      public void readFully(byte[] b, int off, int len) throws IOException {
        ByteStreams.readFully(this, b, off, len);
      }
    
      @Override
      public int skipBytes(int n) throws IOException {
        return (int) in.skip(n);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        InputStream in = source.openBufferedStream();
        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteStreams.copy(in, out);
        in.close();
        out.close();
    
        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
      public void testSize() throws IOException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

    import com.google.common.collect.TreeBasedTable;
    import com.google.common.collect.TreeMultimap;
    import com.google.common.io.ByteSink;
    import com.google.common.io.ByteSource;
    import com.google.common.io.ByteStreams;
    import com.google.common.io.CharSink;
    import com.google.common.io.CharSource;
    import com.google.common.primitives.Primitives;
    import com.google.common.primitives.UnsignedInteger;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
Back to top