类 FileLocation

    • 构造器概要

      构造器 
      限定符 构造器 说明
        FileLocation​(java.io.File file, java.lang.String specification)  
      protected FileLocation​(java.lang.String specification)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void close()
      Close the location.
      java.io.File getFile()
      java.io.InputStream getInputStream()
      java.lang.String getSpecification()
      protected void initFile()
      initialize file.
      void open()
      open the location.
      int read​(byte[] buffer)
      int read​(java.nio.ByteBuffer buffer)
      protected void setFile​(java.io.File file)  
      protected java.io.File unsafeGetFile()  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • FileLocation

        public FileLocation​(java.io.File file,
                            java.lang.String specification)
        参数:
        file - File
        specification - spec.
      • FileLocation

        protected FileLocation​(java.lang.String specification)
        参数:
        specification - spec.
    • 方法详细资料

      • close

        public void close()
        Close the location.
        指定者:
        close 在接口中 Location
      • getFile

        public java.io.File getFile()
                             throws java.io.IOException
        指定者:
        getFile 在接口中 Location
        返回:
        File.
        抛出:
        java.io.IOException - in case of an error.
      • unsafeGetFile

        protected java.io.File unsafeGetFile()
        返回:
        File
      • initFile

        protected void initFile()
                         throws java.io.IOException
        initialize file.
        抛出:
        java.io.IOException - in case error.
      • setFile

        protected void setFile​(java.io.File file)
        参数:
        file - File
      • getSpecification

        public java.lang.String getSpecification()
        指定者:
        getSpecification 在接口中 Location
        返回:
        spec.
      • open

        public void open()
                  throws java.io.IOException
        open the location.
        指定者:
        open 在接口中 Location
        抛出:
        java.io.IOException - in case of an error.
      • read

        public int read​(java.nio.ByteBuffer buffer)
                 throws java.io.IOException
        指定者:
        read 在接口中 Location
        参数:
        buffer - The buffer.
        返回:
        number of read bytes.
        抛出:
        java.io.IOException - in case of an error.
      • read

        public int read​(byte[] buffer)
                 throws java.io.IOException
        指定者:
        read 在接口中 Location
        参数:
        buffer - The buffer.
        返回:
        number of read bytes.
        抛出:
        java.io.IOException - in case of an error.
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        指定者:
        getInputStream 在接口中 Location
        返回:
        the resulting input stream.
        抛出:
        java.io.IOException - in case of an error.