- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for read_bytes (0.57 sec)
-
src/bytes/buffer_test.go
} // after successful read if _, err := b.ReadBytes('m'); err != nil { t.Fatalf("ReadBytes: %v", err) } if err := b.UnreadByte(); err != nil { t.Fatalf("UnreadByte: %v", err) } c, err := b.ReadByte() if err != nil { t.Fatalf("ReadByte: %v", err) } if c != 'm' { t.Errorf("ReadByte = %q; want %q", c, 'm') } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:31:36 UTC 2024 - 18.6K bytes - Viewed (0) -
src/cmd/compile/internal/test/reproduciblebuilds_test.go
if err != nil { t.Fatalf("%v: %v:\n%s", cmd.Args, err, out) } } readBytes := func(fn string) []byte { payload, err := os.ReadFile(fn) if err != nil { t.Fatalf("failed to read executable '%s': %v", fn, err) } return payload } b1 := readBytes(scenarios[0].libpath) b2 := readBytes(scenarios[1].libpath) if !bytes.Equal(b1, b2) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 06 18:07:35 UTC 2023 - 2.8K bytes - Viewed (0) -
src/bufio/bufio_test.go
} // Test error after ReadByte. _, _, err = r.ReadRune() // reset state if err != nil { t.Error("unexpected error on ReadRune (2):", err) } for range buf { _, err = r.ReadByte() if err != nil { t.Error("unexpected error on ReadByte (2):", err) } } if r.UnreadRune() == nil { t.Error("expected error after ReadByte") } // Test error after UnreadByte.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSourceTester.java
try { byte[] readBytes = ByteStreams.toByteArray(in); assertExpectedBytes(readBytes); } finally { in.close(); } } public void testOpenBufferedStream() throws IOException { InputStream in = source.openBufferedStream(); try { byte[] readBytes = ByteStreams.toByteArray(in); assertExpectedBytes(readBytes); } finally { in.close();
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 8.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
public void testNewDataInput_readByte() { ByteArrayDataInput in = ByteStreams.newDataInput(bytes); for (byte aByte : bytes) { assertEquals(aByte, in.readByte()); } IllegalStateException expected = assertThrows(IllegalStateException.class, () -> in.readByte()); assertThat(expected).hasCauseThat().isInstanceOf(EOFException.class); } public void testNewDataInput_readUnsignedByte() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 21.9K bytes - Viewed (0) -
src/bufio/bufio.go
totalLen += len(frag) return fullBuffers, frag, totalLen, err } // ReadBytes reads until the first occurrence of delim in the input, // returning a slice containing the data up to and including the delimiter. // If ReadBytes encounters an error before finding a delimiter, // it returns the data read before the error and the error itself (often io.EOF). // ReadBytes returns err != nil if and only if the returned data does not end in // delim.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/FileUtilTest.java
* either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.core.io; import static org.codelibs.core.io.FileUtil.readBytes; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import java.io.File; import java.net.URL; import org.codelibs.core.net.URLUtil; import org.junit.Test; /**
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 1.6K bytes - Viewed (0) -
src/cmd/go/internal/modindex/build_read.go
func (r *importReader) syntaxError() { if r.err == nil { r.err = errSyntax } } // readByte reads the next byte from the input, saves it in buf, and returns it. // If an error occurs, readByte records the error in r.err and returns 0. func (r *importReader) readByte() byte { c, err := r.b.ReadByte() if err == nil { r.buf = append(r.buf, c) if c == 0 { err = errNUL } } if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 10:10:21 UTC 2023 - 13K bytes - Viewed (0) -
build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/support/ClassBytesRepository.kt
{ getInputStream(jarEntry).use { jarInput -> jarInput.readBytes() } } } } } private fun directoryClassBytesIndexFor(dir: File): ClassBytesIndex = { classFilePath -> dir.resolve(classFilePath).takeIf { it.isFile }?.let { classFile -> { classFile.readBytes() } } } private
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 01 17:45:10 UTC 2024 - 6.2K bytes - Viewed (0) -
src/cmd/go/internal/imports/read.go
func (r *importReader) syntaxError() { if r.err == nil { r.err = errSyntax } } // readByte reads the next byte from the input, saves it in buf, and returns it. // If an error occurs, readByte records the error in r.err and returns 0. func (r *importReader) readByte() byte { c, err := r.b.ReadByte() if err == nil { r.buf = append(r.buf, c) if c == 0 { err = errNUL } } if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 15 18:42:11 UTC 2021 - 6.1K bytes - Viewed (0)