Class BufferedRandomAccessFile

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

    public class BufferedRandomAccessFile
    extends java.io.RandomAccessFile
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getFilePointer()  
      int read()  
      int read​(byte[] bytes, int off, int len)  
      void seek​(long pos)  
      void write​(int b)  
      • Methods inherited from class java.io.RandomAccessFile

        close, getChannel, getFD, length, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BufferedRandomAccessFile

        public BufferedRandomAccessFile​(@NotNull
                                        java.io.File file)
                                 throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • BufferedRandomAccessFile

        public BufferedRandomAccessFile​(@NotNull
                                        java.io.File file,
                                        int bufSize)
                                 throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • BufferedRandomAccessFile

        @Deprecated
        public BufferedRandomAccessFile​(@NotNull
                                        java.io.File file,
                                        @NotNull
                                        java.lang.String mode)
                                 throws java.io.FileNotFoundException
        Deprecated.
        Throws:
        java.io.FileNotFoundException
      • BufferedRandomAccessFile

        @Deprecated
        public BufferedRandomAccessFile​(@NotNull
                                        java.io.File file,
                                        @NotNull
                                        java.lang.String mode,
                                        int bufSize)
                                 throws java.io.FileNotFoundException
        Deprecated.
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • read

        public int read​(@NotNull
                        byte[] bytes,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • seek

        public void seek​(long pos)
                  throws java.io.IOException
        Overrides:
        seek in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • getFilePointer

        public long getFilePointer()
                            throws java.io.IOException
        Overrides:
        getFilePointer in class java.io.RandomAccessFile
        Throws:
        java.io.IOException
      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in interface java.io.DataOutput
        Overrides:
        write in class java.io.RandomAccessFile
        Throws:
        java.io.IOException