Class LayerModuleReader

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

    public class LayerModuleReader
    extends java.lang.Object
    implements java.lang.module.ModuleReader
    Created by adinn on 25/07/16.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Function<java.lang.String,​byte[]> classMapper
      the mapper to which this reader delegates under a read request to locate class definitions
    • Constructor Summary

      Constructors 
      Constructor Description
      LayerModuleReader​(java.util.function.Function<java.lang.String,​byte[]> classMapper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.util.Optional<java.net.URI> find​(java.lang.String name)  
      java.util.stream.Stream<java.lang.String> list()  
      java.util.Optional<java.nio.ByteBuffer> read​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.module.ModuleReader

        open, release
    • Field Detail

      • classMapper

        private final java.util.function.Function<java.lang.String,​byte[]> classMapper
        the mapper to which this reader delegates under a read request to locate class definitions
    • Constructor Detail

      • LayerModuleReader

        public LayerModuleReader​(java.util.function.Function<java.lang.String,​byte[]> classMapper)
    • Method Detail

      • find

        public java.util.Optional<java.net.URI> find​(java.lang.String name)
                                              throws java.io.IOException
        Specified by:
        find in interface java.lang.module.ModuleReader
        Throws:
        java.io.IOException
      • read

        public java.util.Optional<java.nio.ByteBuffer> read​(java.lang.String name)
                                                     throws java.io.IOException
        Specified by:
        read in interface java.lang.module.ModuleReader
        Throws:
        java.io.IOException
      • list

        public java.util.stream.Stream<java.lang.String> list()
                                                       throws java.io.IOException
        Specified by:
        list in interface java.lang.module.ModuleReader
        Throws:
        java.io.IOException
      • close

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