public class RamDiskResource
extends nxm.sys.lib.IOResource
| Modifier and Type | Field and Description |
|---|---|
DevIce.DmaMap |
map |
MDevIce |
pic |
| Constructor and Description |
|---|
RamDiskResource() |
| Modifier and Type | Method and Description |
|---|---|
long |
avail()
get currently available length of resource
|
int |
checkAllocation(int bytes) |
boolean |
close()
close the resource
|
boolean |
delete()
delete the resource
|
boolean |
exists()
Test for the existence of the resource.
|
long |
getLength()
get length of resource
|
long |
getPhysicalAddress() |
nxm.sys.lib.Table |
getStatFS()
Gets statistics of file system that this resource is located on.
|
boolean |
isFile()
Indicates if this resource is a traditional file.
|
boolean |
open()
open the resource
|
int |
read(byte[] buf,
int boff,
int bytes)
read data from resource
|
int |
read(long lbuf,
int boff,
int bytes)
read data from resource
|
boolean |
seek(long offset)
seek to the specified offset in file
|
void |
setURL(java.lang.String str)
Set the URL that this resource points to.
|
java.lang.String |
toString()
Return a printable string containing information about this object.
|
int |
write(byte[] buf,
int boff,
int bytes)
write data to resource
|
int |
write(long lbuf,
int boff,
int bytes)
write data to resource
|
dirToString, getContext, getDir, getEntry, getEntryList, getInputStream, getInstance, getOutputStream, getQualifier, getStateQualifier, getType, getType, getTypeString, getTypeString, getURL, getUrlStream, init, isContainer, isJarFile, isPipe, isReady, isStream, isStreaming, lastModified, lastModifiedTime, open, read, seek, setContext, setDir, setLength, setQualifiers, setType, writepublic MDevIce pic
public DevIce.DmaMap map
public boolean exists()
exists in class nxm.sys.lib.IOResourcepublic boolean isFile()
nxm.sys.lib.IOResourceIOResource.isPipe() (previously (getType() == FILE) was used).isFile in class nxm.sys.lib.IOResourcepublic void setURL(java.lang.String str)
setURL in class nxm.sys.lib.IOResourcestr - The fully qualified URL of the resource.public boolean open()
open in class nxm.sys.lib.IOResourcepublic boolean close()
close in class nxm.sys.lib.IOResourcepublic boolean delete()
delete in class nxm.sys.lib.IOResourcepublic long getLength()
getLength in class nxm.sys.lib.IOResourcepublic boolean seek(long offset)
seek in class nxm.sys.lib.IOResourceoffset - Current seek offset in bytes (0..N-1).public long avail()
avail in class nxm.sys.lib.IOResourcepublic int read(byte[] buf,
int boff,
int bytes)
read in class nxm.sys.lib.IOResourcebuf - The byte buffer to read into.boff - The byte offset into the byte array to start writing at.bytes - The number of bytes to try to read.bytes when at end-of-file
or no more data is available), -1 at the end of the file (EOF),
or -3 (CoreIO.ERROR) on error.public int write(byte[] buf,
int boff,
int bytes)
write in class nxm.sys.lib.IOResourcebuf - The byte buffer to write from.boff - The byte offset into the byte array to start writing from.bytes - The number of bytes to try to write.public int read(long lbuf,
int boff,
int bytes)
read in class nxm.sys.lib.IOResourcelbuf - Native pointer to buffer.boff - The offset into buf to start at.bytes - The number of bytes to try reading.bytes when at end-of-file
or no more data is available) or a value <0 if the end of the file has been
reached or on error: -1 at the end of the file (EOF),
or -3 (CoreIO.ERROR) on error.IOResource.read(byte[], int, int)public int write(long lbuf,
int boff,
int bytes)
write in class nxm.sys.lib.IOResourcelbuf - Native pointer to buffer.boff - The offset into buf to start at.bytes - The number of bytes to write out.bytes.)public java.lang.String toString()
toString in class java.lang.Objectpublic int checkAllocation(int bytes)
public long getPhysicalAddress()
public nxm.sys.lib.Table getStatFS()
nxm.sys.lib.IOResourcegetStatFS in class nxm.sys.lib.IOResource