Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for writeBoolean (0.2 sec)

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

      }
    
      private void initializeData(DataOutputStream out) throws IOException {
        /* Write out various test values NORMALLY */
        out.write(new byte[] {-100, 100});
        out.writeBoolean(true);
        out.writeBoolean(false);
        out.writeByte(100);
        out.writeByte(-100);
        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

      }
    
      private void initializeData(DataOutputStream out) throws IOException {
        /* Write out various test values NORMALLY */
        out.write(new byte[] {-100, 100});
        out.writeBoolean(true);
        out.writeBoolean(false);
        out.writeByte(100);
        out.writeByte(-100);
        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

      public void write(byte[] b, int off, int len) throws IOException {
        // Override slow FilterOutputStream impl
        out.write(b, off, len);
      }
    
      @Override
      public void writeBoolean(boolean v) throws IOException {
        ((DataOutputStream) out).writeBoolean(v);
      }
    
      @Override
      public void writeByte(int v) throws IOException {
        ((DataOutputStream) out).writeByte(v);
      }
    
      /**
    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)
  4. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] expected = {bytes[4], bytes[5]};
        assertThat(out.toByteArray()).isEqualTo(expected);
      }
    
      public void testNewDataOutput_writeBoolean() {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeBoolean(true);
        out.writeBoolean(false);
        byte[] expected = {(byte) 1, (byte) 0};
        assertThat(out.toByteArray()).isEqualTo(expected);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] expected = {bytes[4], bytes[5]};
        assertThat(out.toByteArray()).isEqualTo(expected);
      }
    
      public void testNewDataOutput_writeBoolean() {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeBoolean(true);
        out.writeBoolean(false);
        byte[] expected = {(byte) 1, (byte) 0};
        assertThat(out.toByteArray()).isEqualTo(expected);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        try {
          return block()
        } finally {
          typeHintStack.removeAt(typeHintStack.size - 1)
        }
      }
    
      private fun sink(): BufferedSink = stack[stack.size - 1]
    
      fun writeBoolean(b: Boolean) {
        sink().writeByte(if (b) -1 else 0)
      }
    
      fun writeBigInteger(value: BigInteger) {
        sink().write(value.toByteArray())
      }
    
      fun writeLong(v: Long) {
        val sink = sink()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/ByteStreams.java

            output.write(b, off, len);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public void writeBoolean(boolean v) {
          try {
            output.writeBoolean(v);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public void writeByte(int v) {
          try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

              override fun decode(reader: DerReader): Boolean = reader.readBoolean()
    
              override fun encode(
                writer: DerWriter,
                value: Boolean,
              ) = writer.writeBoolean(value)
            },
        )
    
      val INTEGER_AS_LONG =
        BasicDerAdapter(
          name = "INTEGER",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 2L,
          codec =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  9. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          }
    
          derWriter.write(
            name = "test",
            tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
            tag = 1L,
          ) {
            derWriter.writeBoolean(true)
          }
        }
    
        assertThat(buffer.readByteString()).isEqualTo("300a1505536d6974680101ff".decodeHex())
      }
    
      @Test fun `sequence of`() {
        val bytes = "3009020107020108020109".decodeHex()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
Back to top