Interface Plugin.Engine.Source.Element

All Known Implementing Classes:
Plugin.Engine.Source.Element.ForByteArray, Plugin.Engine.Source.Element.ForFile, Plugin.Engine.Source.Element.ForJarEntry
Enclosing interface:
Plugin.Engine.Source

public static interface Plugin.Engine.Source.Element
Represents a binary element found in a source location.
  • Method Details

    • getName

      String getName()
      Returns the element's relative path and name.
      Returns:
      The element's path and name.
    • getInputStream

      InputStream getInputStream() throws IOException
      Returns an input stream to read this element's binary information.
      Returns:
      An input stream that represents this element's binary information.
      Throws:
      IOException - If an I/O error occurs.
    • resolveAs

      @MaybeNull <T> T resolveAs(Class<T> type)
      Resolves this element to a more specialized form if possible. Doing so allows for performance optimizations if more specialized formats are available.
      Type Parameters:
      T - The requested spezialized type.
      Parameters:
      type - The requested spezialized type.
      Returns:
      The resolved element or null if a transformation is impossible.