Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for ByteSink (0.2 sec)

  1. guava-tests/test/com/google/common/io/ByteSourceTester.java

        source.copyTo(out);
        assertExpectedBytes(out.toByteArray());
      }
    
      public void testCopyTo_byteSink() throws IOException {
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        // HERESY! but it's ok just for this I guess
        source.copyTo(
            new ByteSink() {
              @Override
              public OutputStream openStream() throws IOException {
                return out;
              }
    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)
  2. android/guava-tests/test/com/google/common/io/ByteSinkTest.java

    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.EnumSet;
    
    /**
     * Tests for the default implementations of {@code ByteSink} methods.
     *
     * @author Colin Decker
     */
    public class ByteSinkTest extends IoTestCase {
    
      private final byte[] bytes = newPreFilledByteArray(10000);
    
      private TestByteSink sink;
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteSinkTest.java

    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.util.EnumSet;
    
    /**
     * Tests for the default implementations of {@code ByteSink} methods.
     *
     * @author Colin Decker
     */
    public class ByteSinkTest extends IoTestCase {
    
      private final byte[] bytes = newPreFilledByteArray(10000);
    
      private TestByteSink sink;
    
      @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

    import com.google.common.collect.SortedMapDifference;
    import com.google.common.collect.SortedMultiset;
    import com.google.common.collect.SortedSetMultimap;
    import com.google.common.collect.Table;
    import com.google.common.io.ByteSink;
    import com.google.common.io.ByteSource;
    import com.google.common.io.CharSink;
    import com.google.common.io.CharSource;
    import com.google.common.primitives.UnsignedInteger;
    import com.google.common.primitives.UnsignedLong;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.7K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

    import com.google.common.collect.SortedMapDifference;
    import com.google.common.collect.SortedMultiset;
    import com.google.common.collect.SortedSetMultimap;
    import com.google.common.collect.Table;
    import com.google.common.io.ByteSink;
    import com.google.common.io.ByteSource;
    import com.google.common.io.CharSink;
    import com.google.common.io.CharSource;
    import com.google.common.primitives.UnsignedInteger;
    import com.google.common.primitives.UnsignedLong;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/Files.java

       * will append to the end of the file without truncating it.
       *
       * @since 14.0
       */
      public static ByteSink asByteSink(File file, FileWriteMode... modes) {
        return new FileByteSink(file, modes);
      }
    
      private static final class FileByteSink extends ByteSink {
    
        private final File file;
        private final ImmutableSet<FileWriteMode> modes;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/BaseEncoding.java

      public abstract OutputStream encodingStream(Writer writer);
    
      /**
       * Returns a {@code ByteSink} that writes base-encoded bytes to the specified {@code CharSink}.
       */
      @J2ktIncompatible
      @GwtIncompatible // ByteSink,CharSink
      public final ByteSink encodingSink(CharSink encodedSink) {
        checkNotNull(encodedSink);
        return new ByteSink() {
          @Override
          public OutputStream openStream() throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 15 16:33:32 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

        private final byte[] initialBytes;
    
        private FileByteSinkFactory(byte @Nullable [] initialBytes) {
          this.initialBytes = initialBytes;
        }
    
        @Override
        public ByteSink createSink() throws IOException {
          File file = createFile();
          if (initialBytes != null) {
            FileOutputStream out = new FileOutputStream(file);
            try {
              out.write(initialBytes);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/ByteSource.java

        }
      }
    
      /**
       * Copies the contents of this byte source to the given {@code ByteSink}.
       *
       * @return the number of bytes copied
       * @throws IOException if an I/O error occurs while reading from this source or writing to {@code
       *     sink}
       */
      @CanIgnoreReturnValue
      public long copyTo(ByteSink sink) throws IOException {
        checkNotNull(sink);
    
        Closer closer = Closer.create();
    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)
Back to top