Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,558 for writeFn (6.57 sec)

  1. src/bufio/bufio_test.go

    				t.Errorf("%s: buf.Flush = %v", context, e)
    			}
    
    			written := w.Bytes()
    			if len(written) != nwrite {
    				t.Errorf("%s: %d bytes written", context, len(written))
    			}
    			for l := 0; l < len(written); l++ {
    				if written[l] != data[l] {
    					t.Errorf("wrong bytes written")
    					t.Errorf("want=%q", data[0:len(written)])
    					t.Errorf("have=%q", written)
    				}
    			}
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  2. src/bytes/buffer.go

    	copy(b2, b)
    	return b2[:len(b)]
    }
    
    // WriteTo writes data to w until the buffer is drained or an error occurs.
    // The return value n is the number of bytes written; it always fits into an
    // int, but it is int64 to match the io.WriterTo interface. Any error
    // encountered during the write is also returned.
    func (b *Buffer) WriteTo(w io.Writer) (n int64, err error) {
    	b.lastRead = opInvalid
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/ByteSink.java

          long written = ByteStreams.copy(input, out);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
          return written;
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * A char sink that encodes written characters with a charset and writes resulting bytes to this
       * byte sink.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. cmd/local-locker_gen.go

    		return
    	}
    	err = en.WriteInt(z.Writes)
    	if err != nil {
    		err = msgp.WrapError(err, "Writes")
    		return
    	}
    	// write "Reads"
    	err = en.Append(0xa5, 0x52, 0x65, 0x61, 0x64, 0x73)
    	if err != nil {
    		return
    	}
    	err = en.WriteInt(z.Reads)
    	if err != nil {
    		err = msgp.WrapError(err, "Reads")
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/compare/sds/writer_test.go

    	t.Helper()
    	for _, expected := range expected {
    		if !strings.Contains(output, expected) {
    			t.Errorf("expected %s included in writer output, did not find", expected)
    		}
    	}
    	for _, unexpected := range unexpected {
    		if strings.Contains(output, unexpected) {
    			t.Errorf("unexpected string %s included in writer output", unexpected)
    		}
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri May 29 20:42:01 GMT 2020
    - 4.9K bytes
    - Viewed (0)
  6. internal/ioutil/ioutil.go

    			// we have written the entire stream, return right here.
    			return written, nil
    		}
    
    		if eof {
    			// We reached EOF prematurely but we did not write everything
    			// that we promised that we would write.
    			if totalSize > 0 && written != totalSize {
    				return written, io.ErrUnexpectedEOF
    			}
    			return written, nil
    		}
    	}
    }
    
    // SafeClose safely closes any channel of any type
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  7. internal/logger/logrotate.go

    	opts Options
    
    	// f is the currently open file used for appends.
    	// Writes to f are only synchronized once Close() is called,
    	// or when files are being rotated.
    	f *os.File
    
    	pw *xioutil.PipeWriter
    	pr *xioutil.PipeReader
    }
    
    // Write writes p into the current file, rotating if necessary.
    // Write is non-blocking, if the writer's queue is not full.
    // Write is blocking otherwise.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 11:38:40 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/CharSink.java

       * @since 15.0 (in 14.0 with return type {@link BufferedWriter})
       */
      public Writer openBufferedStream() throws IOException {
        Writer writer = openStream();
        return (writer instanceof BufferedWriter)
            ? (BufferedWriter) writer
            : new BufferedWriter(writer);
      }
    
      /**
       * Writes the given character sequence to this sink.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

        writeInt(Float.floatToIntBits(v));
      }
    
      /**
       * Writes an {@code int} as specified by {@link DataOutputStream#writeInt(int)}, except using
       * little-endian byte order.
       *
       * @throws IOException if an I/O error occurs
       */
      @Override
      public void writeInt(int v) throws IOException {
        out.write(0xFF & v);
        out.write(0xFF & (v >> 8));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  10. cmd/erasure-encode_test.go

    				switch w := writers[j].(type) {
    				case *wholeBitrotWriter:
    					w.disk = badDisk{nil}
    				case *streamingBitrotWriter:
    					w.closeWithErr(errFaultyDisk)
    				}
    			}
    			if test.offDisks > 0 {
    				writers[0] = nil
    			}
    			n, err = erasure.Encode(context.Background(), bytes.NewReader(data[test.offset:]), writers, buffer, erasure.dataBlocks+1)
    			closeBitrotWriters(writers)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 11.9K bytes
    - Viewed (0)
Back to top