Class SimpleResource

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IResource

    public class SimpleResource
    extends java.lang.Object
    implements IResource
    • Field Detail

      • sourceName

        private final java.lang.String sourceName
      • resourceStream

        private final java.io.InputStream resourceStream
      • metadataStream

        private final java.io.InputStream metadataStream
      • triedMetadata

        private boolean triedMetadata
      • metadata

        private com.google.gson.JsonObject metadata
    • Constructor Detail

      • SimpleResource

        public SimpleResource​(java.lang.String p_i47904_1_,
                              ResourceLocation p_i47904_2_,
                              java.io.InputStream p_i47904_3_,
                              @Nullable
                              java.io.InputStream p_i47904_4_)
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Specified by:
        getInputStream in interface IResource
      • hasMetadata

        public boolean hasMetadata()
      • getSourceName

        public java.lang.String getSourceName()
        Specified by:
        getSourceName in interface IResource
      • equals

        public boolean equals​(java.lang.Object p_equals_1_)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException