パッケージ org.thinkit.zenna.loader

クラス ContentLoader

java.lang.Object
org.thinkit.zenna.loader.ContentLoader
すべての実装されたインタフェース:
Loader

public final class ContentLoader
extends Object
implements Loader
The class that defines the content loading process.

In order to create an instance of this ContentLoader class, use the from(InputStream) method and pass the input stream object of the content resource as an initialization argument. Even if the input stream object of the content for initialization is null , no exception will be thrown when executing the constructor process, but a NullPointerException will be thrown when executing the load() method. For this reason, be sure to pass a content input stream object that is not null in order for the content loading process to be successful.

After creating an instance of the ContentLoader class based on the above points, simply call the load() method. This method parses the content input stream object passed when creating an instance of the ContentLoader class, converts the content string defined in JSON format into the structure of LinkedHashMap , and returns it.

導入されたバージョン:
1.0.0
  • メソッドの詳細

    • load

      public Map<String,​Object> load()
      Load and return the obtained object as a map structure.

      Performs the content loading process based on the content input stream specified when creating an instance of this class. The loaded content will be formatted and returned in the format LinkedHashMap .

      定義:
      load インタフェース内 Loader
      戻り値:
      The loaded content
      例外:
      NullPointerException - If the input stream content is null
    • toString

      public String toString()
      オーバーライド:
      toString クラス内 Object
    • equals

      public boolean equals​(Object o)
      オーバーライド:
      equals クラス内 Object
    • hashCode

      public int hashCode()
      オーバーライド:
      hashCode クラス内 Object
    • from

      public static ContentLoader from​(InputStream contentStream)