|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectswisseph.FilePtr
public class FilePtr
This class is meant to be a wrapper to some read functionality of the RandomAccessFile class. It adds the ability to read (and search and seek) in files using http://... access. This is needed to allow applets read access to files, in this case the Swiss Ephemeris and JPL data files.
フィールドの概要 | |
---|---|
static java.lang.String |
useragent
|
コンストラクタの概要 | |
---|---|
FilePtr(java.io.RandomAccessFile fp,
java.net.Socket sk,
java.io.InputStream is,
java.io.BufferedOutputStream os,
java.lang.String fnamp,
long fileLength,
int bufsize)
Creates a new FilePtr instance. |
メソッドの概要 | |
---|---|
void |
close()
Closes the connection to the file. |
long |
getFilePointer()
Returns the current position of the file pointer. |
long |
length()
Returns the length of the file. |
byte |
readByte()
Reads one (signed) byte. |
double |
readDouble()
Reads a double value. |
int |
readInt()
Reads a (signed) integer value. |
java.lang.String |
readLine()
Reads a complete line from the file. |
short |
readShort()
Reads a (signed) short value. |
int |
readUnsignedByte()
Reads one unsigned byte. |
void |
seek(long pos)
Positions the file pointer. |
void |
setBigendian(boolean bigendian)
|
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public static final java.lang.String useragent
コンストラクタの詳細 |
---|
public FilePtr(java.io.RandomAccessFile fp, java.net.Socket sk, java.io.InputStream is, java.io.BufferedOutputStream os, java.lang.String fnamp, long fileLength, int bufsize) throws java.io.IOException
java.io.IOException
メソッドの詳細 |
---|
public void setBigendian(boolean bigendian)
public byte readByte() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before the
byte could be read.public int readUnsignedByte() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before the
byte could be read.public short readShort() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before the
2 bytes could be read completely.public int readInt() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before the
4 bytes could be read completely.public double readDouble() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before the
8 bytes could be read completely.public java.lang.String readLine() throws java.io.IOException, java.io.EOFException
java.io.IOException
- if an I/O error occurs.
java.io.EOFException
- if the end of file is reached before even one
character (byte) could be read.public void close() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public long getFilePointer()
public long length() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public void seek(long pos)
pos
- the new position in the file. The position is seen zero based.
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |