Search Options

Results per page
Sort
Preferred Languages
Advance

Results 291 - 300 of 1,545 for write2 (0.06 sec)

  1. src/archive/zip/fuzz_test.go

    			ww, err := w.CreateHeader(f.header)
    			if err != nil {
    				t.Fatalf("unable to write previously parsed header: %s", err)
    			}
    			if _, err := ww.Write(f.content); err != nil {
    				t.Fatalf("unable to write previously parsed content: %s", err)
    			}
    		}
    
    		if err := w.Close(); err != nil {
    			t.Fatalf("Unable to write archive: %s", err)
    		}
    
    		// TODO: We may want to check if the archive roundtrips.
    	})
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jan 13 18:06:33 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/FunnelsTest.java

      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);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
        assertSame(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/ByteArrayDataOutput.java

     * @since 1.0
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public interface ByteArrayDataOutput extends DataOutput {
      @Override
      void write(int b);
    
      @Override
      void write(byte b[]);
    
      @Override
      void write(byte b[], int off, int len);
    
      @Override
      void writeBoolean(boolean v);
    
      @Override
      void writeByte(int v);
    
      @Override
      void writeShort(int v);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

        }
    
        @Override
        public Hasher putByte(byte b) {
          stream.write(b);
          return this;
        }
    
        @Override
        public Hasher putBytes(byte[] bytes, int off, int len) {
          stream.write(bytes, off, len);
          return this;
        }
    
        @Override
        public Hasher putBytes(ByteBuffer bytes) {
          stream.write(bytes);
          return this;
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  5. internal/ringbuffer/ring_buffer_benchmark_test.go

    	for i := 0; i < b.N; i++ {
    		rb.Write(data)
    	}
    }
    
    func BenchmarkRingBuffer_AsyncWrite(b *testing.B) {
    	rb := New(1024)
    	data := []byte(strings.Repeat("a", 512))
    	buf := make([]byte, 512)
    
    	go func() {
    		for {
    			rb.Write(data)
    		}
    	}()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		rb.Read(buf)
    	}
    }
    
    func BenchmarkRingBuffer_AsyncWriteBlocking(b *testing.B) {
    	const sz = 512
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. cmd/data-usage-cache.go

    	dataUsageCacheVerV2      = 2
    	dataUsageCacheVerV1      = 1
    )
    
    // serialize the contents of the cache.
    func (d *dataUsageCache) serializeTo(dst io.Writer) error {
    	// Add version and compress.
    	_, err := dst.Write([]byte{dataUsageCacheVerCurrent})
    	if err != nil {
    		return err
    	}
    	enc, err := zstd.NewWriter(dst,
    		zstd.WithEncoderLevel(zstd.SpeedFastest),
    		zstd.WithWindowSize(1<<20),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/curl/io/ContentOutputStreamTest.java

            cos.write(new byte[] { 0, 1, 2, 3, 4 });
            assertFalse(cos.done);
            assertTrue(cos.isInMemory());
            cos.close();
            assertFalse(cos.done);
        }
    
        @Test
        public void inFile() throws IOException {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
            cos.write(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 });
    Registered: Thu Oct 31 02:32:13 UTC 2024
    - Last Modified: Mon Nov 14 21:05:19 UTC 2022
    - 2K bytes
    - Viewed (0)
  8. compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java

            }
        }
    
        private void write(Path metadataPath, Metadata metadata) throws RepositoryException {
            try {
                Files.createDirectories(metadataPath.getParent());
                try (OutputStream output = Files.newOutputStream(metadataPath)) {
                    new MetadataStaxWriter().write(output, metadata.getDelegate());
                }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb1/com/SmbComNegotiate.java

            for ( String dialect : this.dialects ) {
                bos.write(0x02);
                try {
                    bos.write(Strings.getASCIIBytes(dialect));
                }
                catch ( IOException e ) {
                    throw new RuntimeCIFSException(e);
                }
                bos.write(0x0);
            }
    
            System.arraycopy(bos.toByteArray(), 0, dst, dstIndex, bos.size());
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 3.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        initializeData(out);
    
        data = baos.toByteArray();
      }
    
      private void initializeData(DataOutputStream out) throws IOException {
        /* Write out various test values NORMALLY */
        out.write(new byte[] {-100, 100});
        out.writeBoolean(true);
        out.writeBoolean(false);
        out.writeByte(100);
        out.writeByte(-100);
        out.writeByte((byte) 200);
        out.writeChar('a');
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top