Class CookieJarText

All Implemented Interfaces:
SessionFeature, Proxy

@Generated("org.javagi.JavaGI") public final class CookieJarText extends CookieJar implements SessionFeature

Text-file-based ("cookies.txt") Cookie Jar

CookieJarText is a CookieJar that reads cookies from and writes them to a text file in format similar to Mozilla's "cookies.txt".

  • Constructor Details

    • CookieJarText

      public CookieJarText(MemorySegment address)
      Create a CookieJarText instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • CookieJarText

      public CookieJarText(String filename, boolean readOnly)

      Creates a CookieJarText.

      filename will be read in at startup to create an initial set of cookies. If readOnly is false, then the non-session cookies will be written to filename when the CookieJar::changed signal is emitted from the jar. (If readOnly is true, then the cookie jar will only be used for this session, and changes made to it will be lost when the jar is destroyed.)

      Parameters:
      filename - the filename to read to/write from
      readOnly - true if filename is read-only
    • CookieJarText

      public CookieJarText()
      Create a new CookieJarText.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the CookieJarText class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected CookieJarText asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class CookieJar
      Returns:
      the instance as if it were its parent type
    • builder

      public static CookieJarText.Builder<? extends CookieJarText.Builder> builder()
      A CookieJarText.Builder object constructs a CookieJarText with the specified properties. Use the various set...() methods to set properties, and finish construction with CookieJarText.Builder.build().
      Returns:
      the builder object