模块  java.desktop
软件包  javax.imageio.stream

Class FileImageOutputStream

    • 构造方法详细信息

      • FileImageOutputStream

        public FileImageOutputStream​(RandomAccessFile raf)
        构造一个 FileImageOutputStream ,它将写入给定的 RandomAccessFile
        参数
        raf - 写一个 RandomAccessFile
        异常
        IllegalArgumentException - 如果 rafnull
    • 方法详细信息

      • seek

        public void seek​(long pos)
                  throws IOException
        设置当前流的位置并将位偏移重置为0.寻找超过文件末尾是合法的; 仅在执行读取时才会抛出EOFException 在执行写入之前,文件长度不会增加。
        参数
        pos - 包含所需文件指针位置的 long
        异常
        IndexOutOfBoundsException - 如果 pos小于刷新位置。
        IOException - 如果发生任何其他I / O错误。
      • finalize

        @Deprecated(since="9")
        protected void finalize()
                         throws Throwable
        Deprecated.
        The finalize method has been deprecated. Subclasses that override finalize in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overriding finalize method. When overriding the finalize method, its implementation must explicitly ensure that super.finalize() is invoked as described in Object.finalize(). See the specification for Object.finalize() for further information about migration options.
        在垃圾回收之前完成此对象。 调用close方法关闭任何打开的输入源。 不应从应用程序代码调用此方法。
        重写:
        finalizeImageInputStreamImpl
        异常
        Throwable - 如果在超类完成期间发生错误。
        另请参见:
        WeakReferencePhantomReference