|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.dvb.projectx.xinput.file.XInputFileImpl
Constructor Summary | |
XInputFileImpl(java.io.File aFile)
Create a XInputFile of type FileType.FILE. |
Method Summary | |
boolean |
exists()
Checks if file exists |
java.lang.Object |
getConstructorParameter()
|
FileType |
getFileType()
Gets the type of this XInputFile implementation. |
java.io.InputStream |
getInputStream()
Get input stream from the file. close() on stream closes XInputFile, too. |
java.io.InputStream |
getInputStream(long start_position)
Get input stream from the file. close() on stream closes XInputFile, too. |
java.lang.String |
getName()
Get Name of file |
java.lang.String |
getParent()
Get Path of parent |
StreamInfo |
getStreamInfo()
|
java.lang.String |
getUrl()
Get url representation of the object. |
long |
lastModified()
Time in milliseconds from the epoch. |
long |
length()
Length of file in bytes. |
void |
randomAccessClose()
|
long |
randomAccessGetFilePointer()
|
void |
randomAccessOpen(java.lang.String mode)
Opens XInputFile for random access |
int |
randomAccessRead()
|
int |
randomAccessRead(byte[] aBuffer)
|
int |
randomAccessRead(byte[] aBuffer,
int aOffset,
int aLength)
|
java.lang.String |
randomAccessReadLine()
|
long |
randomAccessReadLong()
|
void |
randomAccessSeek(long aPosition)
|
void |
randomAccessSingleRead(byte[] aBuffer,
long aPosition)
Convinience method for a single random read access to a input file. |
void |
randomAccessWrite(byte[] aBuffer)
|
boolean |
rename()
rename this file |
void |
setConstructorParameter(java.lang.Object obj)
|
boolean |
setLastModified()
sets Time in milliseconds from the epoch. |
void |
setStreamInfo(StreamInfo _streamInfo)
|
java.lang.String |
toString()
Get String representation of the object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public XInputFileImpl(java.io.File aFile)
aFile
- File data to useMethod Detail |
public java.lang.String toString()
public void setConstructorParameter(java.lang.Object obj)
public java.lang.Object getConstructorParameter()
public java.lang.String getUrl()
public long length()
public long lastModified()
public boolean setLastModified()
public boolean exists()
public java.lang.String getName()
public java.lang.String getParent()
public java.io.InputStream getInputStream() throws java.io.FileNotFoundException, java.net.MalformedURLException, java.io.IOException
public java.io.InputStream getInputStream(long start_position) throws java.io.FileNotFoundException, java.net.MalformedURLException, java.io.IOException
public boolean rename() throws java.io.IOException
public void randomAccessOpen(java.lang.String mode) throws java.io.IOException
mode
- Access mode as in RandomAccessFilepublic void randomAccessClose() throws java.io.IOException
public void randomAccessSeek(long aPosition) throws java.io.IOException
aPosition
- The offset position, measured in bytes from the beginning of the
file, at which to set the file pointer.public long randomAccessGetFilePointer() throws java.io.IOException
public int randomAccessRead() throws java.io.IOException
public int randomAccessRead(byte[] aBuffer) throws java.io.IOException
aBuffer
- The buffer into which the data is read.public int randomAccessRead(byte[] aBuffer, int aOffset, int aLength) throws java.io.IOException
aBuffer
- The buffer into which the data is written.aOffset
- The offset at which the data should be written.aLength
- The amount of data to be read.public java.lang.String randomAccessReadLine() throws java.io.IOException
public void randomAccessWrite(byte[] aBuffer) throws java.io.IOException
aBuffer
- The data.public void randomAccessSingleRead(byte[] aBuffer, long aPosition) throws java.io.IOException
aBuffer
- Buffer to fill with read bytes (up to aBuffer.length() bytes)aPosition
- Fileposition at which we want readpublic long randomAccessReadLong() throws java.io.IOException
public FileType getFileType()
public void setStreamInfo(StreamInfo _streamInfo)
public StreamInfo getStreamInfo()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |