Package Name: java.io.randomaccessfile

Return to: Package List


with java.lang; use java.lang;
with java.lang.String; use java.lang.String;
with java.io.DataOutput; use java.io.DataOutput;
with java.io.DataInput; use java.io.DataInput;
with java.io.File; use java.io.File;
with java.io.FileDescriptor; use java.io.FileDescriptor;

package java.io.RandomAccessFile is
    type RandomAccessFile_Obj is new Object with record
        DataOutput : aliased DataOutput_Obj;  -- implements DataOutput
        DataInput : aliased DataInput_Obj;  -- implements DataInput
    end record;

    type RandomAccessFile_Ptr is access all RandomAccessFile_Obj'Class;
    function new_RandomAccessFile(
        name : String_Ptr;
        mode : String_Ptr;
        Obj : RandomAccessFile_Ptr := null)

      return RandomAccessFile_Ptr;
    function new_RandomAccessFile(
        file : File_Ptr;
        mode : String_Ptr;
        Obj : RandomAccessFile_Ptr := null)

      return RandomAccessFile_Ptr;

    function getFD(Obj : access RandomAccessFile_Obj) return FileDescriptor_Ptr;

    function read(Obj : access RandomAccessFile_Obj) return Integer;
    function read(Obj : access RandomAccessFile_Obj;
        b : String;
        off : Integer;
        len : Integer)

      return Integer;
    function read(Obj : access RandomAccessFile_Obj;
        b : String)

      return Integer;
    procedure readFully(Obj : access RandomAccessFile_Obj;

        b : String);
    procedure readFully(Obj : access RandomAccessFile_Obj;
        b : String;
        off : Integer;

        len : Integer);
    function skipBytes(Obj : access RandomAccessFile_Obj;
        n : Integer)

      return Integer;
    procedure write(Obj : access RandomAccessFile_Obj;

        P1 : Integer);
    procedure write(Obj : access RandomAccessFile_Obj;

        b : String);
    procedure write(Obj : access RandomAccessFile_Obj;
        b : String;
        off : Integer;

        len : Integer);

    function getFilePointer(Obj : access RandomAccessFile_Obj) return Long_Integer;
    procedure seek(Obj : access RandomAccessFile_Obj;

        P1 : Long_Integer);

    function length(Obj : access RandomAccessFile_Obj) return Long_Integer;

    procedure close(Obj : access RandomAccessFile_Obj);

    function readBoolean(Obj : access RandomAccessFile_Obj) return Boolean;

    function readByte(Obj : access RandomAccessFile_Obj) return Character;

    function readUnsignedByte(Obj : access RandomAccessFile_Obj) return Integer;

    function readShort(Obj : access RandomAccessFile_Obj) return Short_Integer;

    function readUnsignedShort(Obj : access RandomAccessFile_Obj) return Integer;

    function readChar(Obj : access RandomAccessFile_Obj) return Wide_Character;

    function readInt(Obj : access RandomAccessFile_Obj) return Integer;

    function readLong(Obj : access RandomAccessFile_Obj) return Long_Integer;

    function readFloat(Obj : access RandomAccessFile_Obj) return Float;

    function readDouble(Obj : access RandomAccessFile_Obj) return Long_Float;

    function readLine(Obj : access RandomAccessFile_Obj) return String_Ptr;

    function readUTF(Obj : access RandomAccessFile_Obj) return String_Ptr;
    procedure writeBoolean(Obj : access RandomAccessFile_Obj;

        v : Boolean);
    procedure writeByte(Obj : access RandomAccessFile_Obj;

        v : Integer);
    procedure writeShort(Obj : access RandomAccessFile_Obj;

        v : Integer);
    procedure writeChar(Obj : access RandomAccessFile_Obj;

        v : Integer);
    procedure writeInt(Obj : access RandomAccessFile_Obj;

        v : Integer);
    procedure writeLong(Obj : access RandomAccessFile_Obj;

        v : Long_Integer);
    procedure writeFloat(Obj : access RandomAccessFile_Obj;

        v : Float);
    procedure writeDouble(Obj : access RandomAccessFile_Obj;

        v : Long_Float);
    procedure writeBytes(Obj : access RandomAccessFile_Obj;

        s : String_Ptr);
    procedure writeChars(Obj : access RandomAccessFile_Obj;

        s : String_Ptr);
    procedure writeUTF(Obj : access RandomAccessFile_Obj;

        str : String_Ptr);
    pragma Import(Java, length);
    pragma Import(Java, getFilePointer);
    pragma Import(Java, readBoolean);
    pragma Import(Java, close);
    pragma Import(Java, getFD);
    pragma Import(Java, readFully);
    pragma Import(Java, readInt);
    pragma Import(Java, writeBoolean);
    pragma Import(Java, writeUTF);
    pragma Import(Java, readUnsignedShort);
    pragma Import(Java, writeBytes);
    pragma Import(Java, readUnsignedByte);
    pragma Import(Java, readFloat);
    pragma Import(Java, readByte);
    pragma Import(Java, readLine);
    pragma Import(Java, writeDouble);
    pragma Import(Java, readShort);
    pragma Import(Java, readChar);
    pragma Import(Java, writeByte);
    pragma Import(Java, writeChars);
    pragma Import(Java, read);
    pragma Import(Java, writeFloat);
    pragma Import(Java, writeChar);
    pragma Import(Java, readLong);
    pragma Import(Java, readUTF);
    pragma Import(Java, write);
    pragma Import(Java, writeShort);
    pragma Import(Java, writeInt);
    pragma Import(Java, seek);
    pragma Import(Java, skipBytes);
    pragma Import(Java, writeLong);

    pragma Import(Java, readDouble);

    pragma Import(Java_Constructor, new_RandomAccessFile);
end java.io.RandomAccessFile;