Class License.Create

  • Enclosing class:
    License

    public static class License.Create
    extends Object
    Inner class containing factory methods to create a license object from various sources. It is recommended not to import these static methods using static import into the code. For example License.Create.from() is more readable than from() following an import static License.Create.from;.
    • Constructor Detail

      • Create

        public Create()
    • Method Detail

      • from

        public static License from​(byte[] array)
        Create a license from the binary byte array representation.
        Parameters:
        array - the binary byte array representation of the license
        Returns:
        the license object.
      • from

        public static License from​(String text)
        Get a license with the features from the string. The format of the string is the same as the one, which was generated by the License.toString().

        The syntax is more relaxed than in case of License.toString(), however. The spaces at the start of the lines, between the feature name and the : and around the type name before the = sign are removed. In case of multi-line string the spaces before and after the end string are also removed. Spaces, however, inside STRING features remain intact including line trailing spaces.

        Parameters:
        text - the license in string format
        Returns:
        the license.