Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,685 for read (0.14 sec)

  1. internal/ioutil/read_file.go

    	_, err = io.ReadFull(f, dst)
    	return dst, st, err
    }
    
    // ReadFile reads the named file and returns the contents.
    // A successful call returns err == nil, not err == EOF.
    // Because ReadFile reads the whole file, it does not treat an EOF from Read
    // as an error to be reported.
    //
    // passes NOATIME flag for reads on Unix systems to avoid atime updates.
    func ReadFile(name string) ([]byte, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 09 18:17:51 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_read_with_orm_mode.py

    
    @needs_pydanticv1
    def test_read_with_orm_mode_pv1() -> None:
        class PersonBase(BaseModel):
            name: str
            lastname: str
    
        class Person(PersonBase):
            @property
            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
            class Config:
                orm_mode = True
                read_with_orm_mode = True
    
        class PersonCreate(PersonBase):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  3. api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java

    /**
     * Generic interface to read/write objects to/from XML.
     *
     * @param <T> the object type to read/write
     * @since 4.0.0
     */
    @Experimental
    public interface XmlFactory<T> extends Service {
    
        @Nonnull
        default T read(@Nonnull Path path) throws XmlReaderException {
            return read(path, true);
        }
    
        @Nonnull
        default T read(@Nonnull Path path, boolean strict) throws XmlReaderException {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Nov 17 15:52:15 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        StringWriter writer = new StringWriter();
        char[] buf = new char[64];
        int read;
        while ((read = reader.read(buf)) != -1) {
          writer.write(buf, 0, read);
        }
        reader.close();
        writer.close();
    
        assertTrue(source.wasStreamClosed());
        assertEquals(STRING, writer.toString());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/LineReader.java

          // The default implementation of Reader#read(CharBuffer) allocates a
          // temporary char[], so we call Reader#read(char[], int, int) instead.
          int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf);
          if (read == -1) {
            lineBuf.finish();
            break;
          }
          lineBuf.add(buf, 0, read);
        }
        return lines.poll();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  6. internal/deadlineconn/deadlineconn.go

    func (c *DeadlineConn) setWriteDeadline() {
    	if c.writeDeadline > 0 {
    		c.SetWriteDeadline(time.Now().UTC().Add(c.writeDeadline))
    	}
    }
    
    // Read - reads data from the connection using wrapped buffered reader.
    func (c *DeadlineConn) Read(b []byte) (n int, err error) {
    	c.setReadDeadline()
    	n, err = c.Conn.Read(b)
    	return n, err
    }
    
    // Write - writes data to the connection.
    func (c *DeadlineConn) Write(b []byte) (n int, err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(inputStream!!.read()).isEqualTo('A'.code)
        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        assertThat(inputStream.read()).isEqualTo('D'.code)
        assertThat(inputStream.read()).isEqualTo('E'.code)
        assertThat(inputStream.read()).isEqualTo('F'.code)
        assertThat(inputStream.read()).isEqualTo(-1)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. internal/bucket/bandwidth/reader.go

    type MonitorReaderOptions struct {
    	BucketOptions
    	HeaderSize int
    }
    
    // Read implements a throttled read
    func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    	b := r.throttle.Burst()  // maximum available tokens
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  9. 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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        ByteSource source = out.asByteSource();
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.reset();
        assertTrue(Arrays.equals(new byte[0], source.read()));
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.close();
      }
    
      private static boolean isAndroid() {
    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)
Back to top