Module javafx.graphics
Package javafx.css

# Class StyleConverter.StringStore

java.lang.Object
javafx.css.StyleConverter.StringStore

Enclosing class:
  StyleConverter<F,T>

public static class StyleConverter.StringStore extends Object
The StringStore class.

Since:
  9

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final List<String>`
  `strings`
  List of strings of this `StringStore`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StringStore()`
  Creates a `StringStore`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `addString(String s)`
  Adds given string to the `StringStore`.
  `static String[]`
  `readBinary(DataInputStream is)`
  Read the StringStore strings from a given `DataInputStream`.
  `void`
  `writeBinary(DataOutputStream os)`
  Writes the `StringStore` strings to a given `DataOutputStream`.

  ### Methods declared in class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### strings

    public final List<String> strings
    List of strings of this `StringStore`.

- ## Constructor Details

  - ### StringStore

    public StringStore()
    Creates a `StringStore`.

- ## Method Details

  - ### addString

    public int addString(String s)
    Adds given string to the `StringStore`.
    Parameters:
      `s` - string to be added to the `StringStore`
    Returns:
      index at which the given string gets added

  - ### writeBinary

    public void writeBinary(DataOutputStream os) throws IOException
    Writes the `StringStore` strings to a given `DataOutputStream`.
    Parameters:
      `os` - `DataOutputStream` where the StringStore strings need to be written
    Throws:
      `IOException` - if writing to `DataOutputStream` fails

  - ### readBinary

    public static String[] readBinary(DataInputStream is) throws IOException
    Read the StringStore strings from a given `DataInputStream`.
    Parameters:
      `is` - `DataInputStream` from where StringStore strings need to be read from
    Returns:
      a `String` array constructed by reading `DataInputStream`
    Throws:
      `IOException` - if reading from `DataInputStream` fails