Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for asOutputStream (0.04 sec)

  1. android/guava/src/com/google/common/hash/Funnels.java

       *
       * <p>The {@code close} and {@code flush} methods of the returned {@code OutputStream} do nothing,
       * and no method throws {@code IOException}.
       *
       * @since 13.0
       */
      public static OutputStream asOutputStream(PrimitiveSink sink) {
        return new SinkAsStream(sink);
      }
    
      private static final class SinkAsStream extends OutputStream {
        final PrimitiveSink sink;
    
        SinkAsStream(PrimitiveSink sink) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/hash/Funnels.java

       *
       * <p>The {@code close} and {@code flush} methods of the returned {@code OutputStream} do nothing,
       * and no method throws {@code IOException}.
       *
       * @since 13.0
       */
      public static OutputStream asOutputStream(PrimitiveSink sink) {
        return new SinkAsStream(sink);
      }
    
      private static final class SinkAsStream extends OutputStream {
        final PrimitiveSink sink;
    
        SinkAsStream(PrimitiveSink sink) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/FunnelsTest.java

          fail();
        } catch (NullPointerException ok) {
        }
      }
    
      public void testAsOutputStream() throws Exception {
        PrimitiveSink sink = mock(PrimitiveSink.class);
        OutputStream out = Funnels.asOutputStream(sink);
        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteSource.java

       * @throws IOException if an I/O error occurs while reading from this source
       */
      public HashCode hash(HashFunction hashFunction) throws IOException {
        Hasher hasher = hashFunction.newHasher();
        copyTo(Funnels.asOutputStream(hasher));
        return hasher.hash();
      }
    
      /**
       * Checks that the contents of this byte source are equal to the contents of the given byte
       * source.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Mar 20 20:55:20 UTC 2025
    - 25.7K bytes
    - Viewed (0)
Back to top