Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 520 for Reset (0.14 sec)

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

        assertTrue(reader.markSupported());
    
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset and read again
        reader.reset();
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset, skip, mark, then read the rest
        reader.reset();
        assertEquals(5, reader.skip(5));
        reader.mark(Integer.MAX_VALUE);
        assertEquals(string.substring(5), readFully(reader));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

          }
        }
        out.close();
    
        // Check that source returns the right data
        assertTrue(Arrays.equals(data, source.read()));
    
        // Make sure that reset deleted the file
        out.reset();
        if (file != null) {
          assertFalse(file.exists());
        }
      }
    
    
      public void testThreshold_resetOnFinalize() throws Exception {
        testThreshold(0, 100, true, true);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/FileBackedOutputStream.java

       *
       * @throws IOException if an I/O error occurred while deleting the file buffer
       */
      public synchronized void reset() throws IOException {
        try {
          close();
        } finally {
          if (memory == null) {
            memory = new MemoryOutput();
          } else {
            memory.reset();
          }
          out = memory;
          if (file != null) {
            File deleteMe = file;
            file = null;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/CountingInputStream.java

        mark = count;
        // it's okay to mark even if mark isn't supported, as reset won't work
      }
    
      @Override
      public synchronized void reset() throws IOException {
        if (!in.markSupported()) {
          throw new IOException("Mark not supported");
        }
        if (mark == -1) {
          throw new IOException("Mark not set");
        }
    
        in.reset();
        count = mark;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  5. src/bufio/bufio.go

    // the buffered reader to read from r.
    // Calling Reset on the zero value of [Reader] initializes the internal buffer
    // to the default size.
    // Calling b.Reset(b) (that is, resetting a [Reader] to itself) does nothing.
    func (b *Reader) Reset(r io.Reader) {
    	// If a Reader r is passed to NewReader, NewReader will return r.
    	// Different layers of code may do that, and then later pass r
    	// to Reset. Avoid infinite recursion in that case.
    	if b == r {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  6. src/bytes/buffer.go

    func (b *Buffer) Truncate(n int) {
    	if n == 0 {
    		b.Reset()
    		return
    	}
    	b.lastRead = opInvalid
    	if n < 0 || n > b.Len() {
    		panic("bytes.Buffer: truncation out of range")
    	}
    	b.buf = b.buf[:b.off+n]
    }
    
    // Reset resets the buffer to be empty,
    // but it retains the underlying storage for use by future writes.
    // Reset is the same as [Buffer.Truncate](0).
    func (b *Buffer) Reset() {
    	b.buf = b.buf[:0]
    	b.off = 0
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/zip/ZipInputStreamUtil.java

            }
        }
    
        /**
         * {@link ZipInputStream#reset()}の例外処理をラップするメソッドです。
         *
         * @param zis
         *            {@link ZipInputStream}。{@literal null}であってはいけません
         * @see ZipInputStream#reset()
         */
        public static void reset(final ZipInputStream zis) {
            assertArgumentNotNull("zis", zis);
    
            try {
                zis.reset();
            } catch (final IOException e) {
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  8. tensorflow/c/eager/unified_api_test.cc

        ASSERT_EQ(errors::OK, s.code()) << s.message();
        ctx.reset(ctx_raw);
      }
    
      AbstractTensorHandlePtr x;
      {
        AbstractTensorHandle* x_raw = nullptr;
        Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx.get(), 2.0f, &x_raw);
        ASSERT_EQ(errors::OK, s.code()) << s.message();
        x.reset(x_raw);
      }
    
      Status s = RunModel(TestScalarShape, ctx.get(),
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  9. docs/debugging/pprofgoparser/main.go

    	f, err := os.Open(path)
    	if err != nil {
    		return nil, err
    	}
    
    	bf := bytes.Buffer{}
    
    	save := func(s string) {
    		bf.WriteString(s + "\n")
    	}
    	reset := func() {
    		bf.Reset()
    	}
    
    	ret := make(map[time.Duration][]string)
    
    	s := bufio.NewScanner(f)
    	s.Split(bufio.ScanLines)
    
    	var (
    		t            time.Duration
    		skip, record bool
    	)
    
    	for s.Scan() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/bufio/bufio_test.go

    		t.Errorf("buf = %q; want foo", buf)
    	}
    
    	r.Reset(strings.NewReader("bar bar"))
    	checkAll(r, "bar bar")
    
    	*r = Reader{} // zero out the Reader
    	r.Reset(strings.NewReader("bar bar"))
    	checkAll(r, "bar bar")
    
    	// Wrap a reader and then Reset to that reader.
    	r.Reset(strings.NewReader("recur"))
    	r2 := NewReader(r)
    	checkAll(r2, "recur")
    	r.Reset(strings.NewReader("recur2"))
    	r2.Reset(r)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
Back to top