Class PemEncodingsSecondPreviewExamples

java.lang.Object
net.jrodolfo.java_evolution.java26.PemEncodingsSecondPreviewExamples

public class PemEncodingsSecondPreviewExamples extends Object
Demonstrates the second preview of PEM encodings of cryptographic objects from JEP 524.

The preview API is exercised in an isolated child JVM. The generated probe performs an in-memory PEM encode/decode round trip using deterministic DER bytes, so the main Maven build does not need preview flags or cryptographic files.

  • Constructor Details

    • PemEncodingsSecondPreviewExamples

      public PemEncodingsSecondPreviewExamples()
  • Method Details

    • runPemWorkflow

      Runs the Java 26 preview PEM round-trip workflow.
      Parameters:
      workspace - temporary directory for generated source and classes
      Returns:
      result containing compilation and execution output
      Throws:
      IOException - when the source file cannot be written
      InterruptedException - when waiting for a child process is interrupted
    • probeSource

      public String probeSource()
      Source used by the child JVM to exercise the preview PEM API.
      Returns:
      generated Java source
    • purpose

      public String purpose()
      Explains the feature goal.
      Returns:
      a short feature explanation
    • status

      public String status()
      Explains the second-preview status.
      Returns:
      a short status note
    • previewBoundary

      public String previewBoundary()
      Explains why the preview API runs in a child process.
      Returns:
      the preview boundary
    • exampleScope

      public String exampleScope()
      Explains the scope of this example.
      Returns:
      a short scope explanation