Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for readBoolean (0.07 sec)

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

        /* Read in various values NORMALLY */
        byte[] b = new byte[2];
        in.readFully(b);
        assertEquals(-100, b[0]);
        assertEquals(100, b[1]);
        assertEquals(true, in.readBoolean());
        assertEquals(false, in.readBoolean());
        assertEquals(100, in.readByte());
        assertEquals(-100, in.readByte());
        assertEquals(200, in.readUnsignedByte());
        assertEquals('\u6100', in.readChar());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

        /* Read in various values NORMALLY */
        byte[] b = new byte[2];
        in.readFully(b);
        assertEquals(-100, b[0]);
        assertEquals(100, b[1]);
        assertEquals(true, in.readBoolean());
        assertEquals(false, in.readBoolean());
        assertEquals(100, in.readByte());
        assertEquals(-100, in.readByte());
        assertEquals(200, in.readUnsignedByte());
        assertEquals('\u6100', in.readChar());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

      fun <T> withTypeHint(block: () -> T): T {
        typeHintStack.add(null)
        try {
          return block()
        } finally {
          typeHintStack.removeAt(typeHintStack.size - 1)
        }
      }
    
      fun readBoolean(): Boolean {
        if (bytesLeft != 1L) throw ProtocolException("unexpected length: $bytesLeft at $this")
        return source.readByte().toInt() != 0
      }
    
      fun readBigInteger(): BigInteger {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

          name = "BOOLEAN",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 1L,
          codec =
            object : BasicDerAdapter.Codec<Boolean> {
              override fun decode(reader: DerReader): Boolean = reader.readBoolean()
    
              override fun encode(
                writer: DerWriter,
                value: Boolean,
              ) = writer.writeBoolean(value)
            },
        )
    
      val INTEGER_AS_LONG =
        BasicDerAdapter(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/ByteStreams.java

          try {
            return input.skipBytes(n);
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
    
        @Override
        public boolean readBoolean() {
          try {
            return input.readBoolean();
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
    
        @Override
        public byte readByte() {
          try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  6. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

            assertThat(derReader.readOctetString()).isEqualTo("Smith".encodeUtf8())
          }
    
          derReader.read("test") { header3 ->
            assertThat(header3.tag).isEqualTo(1L)
            assertThat(derReader.readBoolean()).isTrue()
          }
    
          assertThat(derReader.hasNext()).isFalse()
        }
    
        assertThat(derReader.hasNext()).isFalse()
      }
    
      @Test fun `encode raw sequence`() {
        val buffer = Buffer()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 31.7K bytes
    - Viewed (0)
Back to top