Class GISLayerReader

    • Constructor Detail

      • GISLayerReader

        public GISLayerReader​(File filename)
                       throws IOException
        Constructs a GIS reader.
        Parameters:
        filename - is the file to read
        Throws:
        IOException - in case of error.
      • GISLayerReader

        public GISLayerReader​(URL url)
                       throws IOException
        Constructs a GIS reader.
        Parameters:
        url - is the URL of the file to read
        Throws:
        IOException - in case of error.
      • GISLayerReader

        public GISLayerReader​(InputStream stream)
                       throws IOException
        Constructs a GIS reader.
        Parameters:
        stream - is is the stream to read
        Throws:
        IOException - in case of error.
    • Method Detail

      • getProgression

        @Pure
        public Progression getProgression()
        Replies the task progression.
        Returns:
        the task progression object associated to this reader, or null
      • setProgression

        public void setProgression​(Progression progressBar)
        Set the task progression associated to this reader.
        Parameters:
        progressBar - is the task progression object associated to this reader, or null
      • iterator

        public <T extends MapLayerIterator<T> iterator​(Class<T> type)
        Replies an iterator on the layers of the given type and read from the input stream.
        Type Parameters:
        T - the type of the layers to reply.
        Parameters:
        type - is the type of the layers to reply.
        Returns:
        the iterator.
      • read

        public final <T extends MapLayer> T read​(Class<T> type)
                                          throws IOException
        Read the next layer of the given type from the input.
        Type Parameters:
        T - is the type of the expected layer.
        Parameters:
        type - is the type of the expected layer.
        Returns:
        the next layer in the input stream, or null if there is no more object of the given type.
        Throws:
        IOException - in case of error.
        IndexOutOfBoundsException - in case of error.
      • readHeader

        protected void readHeader()
                           throws IOException
        Read the header of the file.
        Throws:
        IOException - in case of error.