test_class.file: java_src/src/test/java/com/google/crypto/tink/CleartextKeysetHandleTest.java
test_class.identifier: CleartextKeysetHandleTest
test_case.body: @Test
    public void testWrite() throws Exception {
      // Create a keyset that contains a single HmacKey.
      KeyTemplate template = MacKeyTemplates.HMAC_SHA256_128BITTAG;
      KeysetHandle handle = KeysetManager.withEmptyKeyset().rotate(template).getKeysetHandle();
      ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
      KeysetWriter writer = BinaryKeysetWriter.withOutputStream(outputStream);
      CleartextKeysetHandle.write(handle, writer);
      ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
      KeysetReader reader = BinaryKeysetReader.withInputStream(inputStream);
      KeysetHandle handle2 = CleartextKeysetHandle.read(reader);
      assertEquals(handle.getKeyset(), handle2.getKeyset());
    }
test_case.class_method_signature: CleartextKeysetHandleTest.testWrite()
test_case.full_signature: @Test public void testWrite()
test_case.identifier: testWrite
test_case.invocations: getKeysetHandle rotate withEmptyKeyset withOutputStream write toByteArray withInputStream read assertEquals getKeyset getKeyset
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWrite()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/CleartextKeysetHandle.java
focal_class.identifier: CleartextKeysetHandle
focal_class.class_method_signature: CleartextKeysetHandle.parseFrom(final byte[] serialized)
focal_class.full_signature: @Deprecated public static final KeysetHandle parseFrom(final byte[] serialized)
focal_class.identifier: parseFrom
focal_class.modifiers: @Deprecated public static final
focal_class.parameters: (final byte[] serialized)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle parseFrom(final byte[] serialized)
focal_class.class_method_signature: CleartextKeysetHandle.read(KeysetReader reader)
focal_class.full_signature: public static KeysetHandle read(KeysetReader reader)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (KeysetReader reader)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle read(KeysetReader reader)
focal_class.class_method_signature: CleartextKeysetHandle.getKeyset(KeysetHandle keysetHandle)
focal_class.full_signature: public static Keyset getKeyset(KeysetHandle keysetHandle)
focal_class.identifier: getKeyset
focal_class.modifiers: public static
focal_class.parameters: (KeysetHandle keysetHandle)
focal_class.return: Keyset
focal_class.signature: Keyset getKeyset(KeysetHandle keysetHandle)
focal_class.class_method_signature: CleartextKeysetHandle.fromKeyset(Keyset keyset)
focal_class.full_signature: public static KeysetHandle fromKeyset(Keyset keyset)
focal_class.identifier: fromKeyset
focal_class.modifiers: public static
focal_class.parameters: (Keyset keyset)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle fromKeyset(Keyset keyset)
focal_class.class_method_signature: CleartextKeysetHandle.write(KeysetHandle handle, KeysetWriter keysetWriter)
focal_class.full_signature: public static void write(KeysetHandle handle, KeysetWriter keysetWriter)
focal_class.identifier: write
focal_class.modifiers: public static
focal_class.parameters: (KeysetHandle handle, KeysetWriter keysetWriter)
focal_class.return: void
focal_class.signature: void write(KeysetHandle handle, KeysetWriter keysetWriter)
focal_method.body: public static void write(KeysetHandle handle, KeysetWriter keysetWriter) throws IOException {
      keysetWriter.write(handle.getKeyset());
    }
focal_method.class_method_signature: CleartextKeysetHandle.write(KeysetHandle handle, KeysetWriter keysetWriter)
focal_method.full_signature: public static void write(KeysetHandle handle, KeysetWriter keysetWriter)
focal_method.identifier: write
focal_method.invocations: write getKeyset
focal_method.modifiers: public static
focal_method.parameters: (KeysetHandle handle, KeysetWriter keysetWriter)
focal_method.return: void
focal_method.signature: void write(KeysetHandle handle, KeysetWriter keysetWriter)