Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,390 for dwrite (0.13 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/FileOperator.kt

    import java.nio.channels.FileChannel
    import okio.Buffer
    
    /**
     * Read and write a target file. Unlike Okio's built-in `Okio.source(java.io.File file)` and `Okio.sink(java.io.File file)`
     * this class offers:
     *
     *  * **Read/write:** read and write using the same operator.
     *  * **Random access:** access any position within the file.
     *  * **Shared channels:** read and write a file channel that's shared between
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. src/cmd/dist/testjson.go

    	"errors"
    	"fmt"
    	"io"
    	"sync"
    	"time"
    )
    
    // lockedWriter serializes Write calls to an underlying Writer.
    type lockedWriter struct {
    	lock sync.Mutex
    	w    io.Writer
    }
    
    func (w *lockedWriter) Write(b []byte) (int, error) {
    	w.lock.Lock()
    	defer w.lock.Unlock()
    	return w.w.Write(b)
    }
    
    // testJSONFilter is an io.Writer filter that replaces the Package field in
    // test2json output.
    type testJSONFilter struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. pkg/proxy/util/linebuffer_test.go

    	}{
    		{
    			name:     "write no line",
    			expected: 0,
    		},
    		{
    			name:     "write one line",
    			expected: 1,
    		},
    		{
    			name:     "write 100 lines",
    			expected: 100,
    		},
    		{
    			name:     "write 1000 lines",
    			expected: 1000,
    		},
    		{
    			name:     "write 10000 lines",
    			expected: 10000,
    		},
    		{
    			name:     "write 100000 lines",
    			expected: 100000,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 12:38:25 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/io/pipe_test.go

    	. "io"
    	"slices"
    	"strings"
    	"testing"
    	"time"
    )
    
    func checkWrite(t *testing.T, w Writer, data []byte, c chan int) {
    	n, err := w.Write(data)
    	if err != nil {
    		t.Errorf("write: %v", err)
    	}
    	if n != len(data) {
    		t.Errorf("short write: %d != %d", n, len(data))
    	}
    	c <- 0
    }
    
    // Test a single read/write pair.
    func TestPipe1(t *testing.T) {
    	c := make(chan int)
    	r, w := Pipe()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. src/runtime/time_fake.go

    	return faketime / 1e9, int32(faketime % 1e9), faketime
    }
    
    // write is like the Unix write system call.
    // We have to avoid write barriers to avoid potential deadlock
    // on write calls.
    //
    //go:nowritebarrierrec
    func write(fd uintptr, p unsafe.Pointer, n int32) int32 {
    	if !(fd == 1 || fd == 2) {
    		// Do an ordinary write.
    		return write1(fd, p, n)
    	}
    
    	// Write with the playback header.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:15:13 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/AppendableWriterTest.java

        StringBuilder builder = new StringBuilder();
        Writer writer = new AppendableWriter(builder);
    
        writer.write("Hello".toCharArray());
        writer.write(',');
        writer.write(0xBEEF0020); // only lower 16 bits are important
        writer.write("Wo");
        writer.write("Whirled".toCharArray(), 3, 2);
        writer.write("Mad! Mad, I say", 2, 2);
    
        assertEquals("Hello, World!", builder.toString());
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  7. 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.write(0)
            encoder.write(127)
            encoder.write(128)
            encoder.write(255)
            encoder.flush()
    
            then:
            def inputStream = new ByteArrayInputStream(outputStream.toByteArray())
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
          assertThrows(IOException.class, () -> out.write(data));
          return;
        }
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.close();
        assertThrows(IOException.class, () -> out.write(42));
    
        // Verify that write had no effect
        assertTrue(Arrays.equals(data, source.read()));
        out.reset();
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  9. src/internal/coverage/encodecounter/encode.go

    // coverage counter data.
    type CounterVisitorFn func(pkid uint32, funcid uint32, counters []uint32) error
    
    // Write writes the contents of the count-data file to the writer
    // previously supplied to NewCoverageDataWriter. Returns an error
    // if something went wrong somewhere with the write.
    func (cfw *CoverageDataWriter) Write(metaFileHash [16]byte, args map[string]string, visitor CounterVisitor) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java

            Objects.requireNonNull(output, "output cannot be null");
            Objects.requireNonNull(settings, "settings cannot be null");
    
            try (Writer out = output) {
                new SettingsStaxWriter().write(out, settings.getDelegate());
            } catch (XMLStreamException e) {
                throw new IOException("Error writing settings", e);
            }
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 08:39:32 UTC 2023
    - 2.7K bytes
    - Viewed (0)
Back to top