public class IceResource
extends nxm.sys.lib.IOResource
| Constructor and Description |
|---|
IceResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
close the resource
|
boolean |
delete()
delete the resource
|
boolean |
exists()
test existence of the resource
|
static int |
free_mem(long ptr)
Frees a block memory
|
long |
getDeviceSize()
Getter for size of the array
|
int |
getNumDevs()
Getter for number of disks
|
java.lang.String |
getPath()
Getter for AUX directory
|
nxm.sys.lib.Table |
getStatFS()
Gets statistics of file system that this resource is located on.
|
int |
getStripeSize()
Stripe size getter
|
long |
getTotalLen()
Getter for total file size
|
boolean |
isFile()
Indicates if this resource is a traditional file.
|
static boolean |
load() |
static long |
malloc(long size)
Allocates a block of memory
|
boolean |
open()
open the resource
|
static void |
p2ps(long ptr1,
int off1,
int stride1,
long ptr2,
int off2,
int stride2,
int step,
int bytes) |
int |
read(byte[] buf,
int boff,
int bin)
Read data from resource.
|
int |
read(long lbuf,
int boff,
int bin)
Read into the native pointer at boff.
|
boolean |
seek(long soff)
seek to the specified offset in file
|
void |
setExtend(long ext)
Setter for extend size.
|
void |
setLength(long len)
set length of resource in bytes
|
void |
setURL(java.lang.String str)
Sets the fully qualified URL of the resource.
|
java.lang.String |
toString()
Return a printable string containing information about this object.
|
int |
write(byte[] buf,
int boff,
int bin)
Write data to resource.
|
int |
write(long lbuf,
int boff,
int bin)
Write from native pointer at boff.
|
avail, dirToString, getContext, getDir, getEntry, getEntryList, getInputStream, getInstance, getLength, getOutputStream, getQualifier, getStateQualifier, getType, getType, getTypeString, getTypeString, getURL, getUrlStream, isContainer, isPipe, isReady, isStream, isStreaming, lastModified, lastModifiedTime, open, read, seek, setContext, setDir, setQualifiers, setType, writepublic static void p2ps(long ptr1,
int off1,
int stride1,
long ptr2,
int off2,
int stride2,
int step,
int bytes)
public static boolean load()
public boolean exists()
nxm.sys.lib.IOResourceexists 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 boolean delete()
nxm.sys.lib.IOResourcedelete in class nxm.sys.lib.IOResourcepublic void setURL(java.lang.String str)
nxm.sys.lib.IOResourcesetURL in class nxm.sys.lib.IOResourcestr - The fully qualified URL of the resource.public void setExtend(long ext)
ext - suggested size for extensionpublic void setLength(long len)
nxm.sys.lib.IOResourcesetLength in class nxm.sys.lib.IOResourcelen - Length in bytespublic boolean open()
nxm.sys.lib.IOResourceopen in class nxm.sys.lib.IOResourcepublic boolean close()
nxm.sys.lib.IOResourceclose in class nxm.sys.lib.IOResourcepublic int read(byte[] buf,
int boff,
int bin)
nxm.sys.lib.IOResourceread in class nxm.sys.lib.IOResourcebuf - The byte buffer to read into.boff - The byte offset into the byte array to start writing at.bin - The number of bytes to try to read.CoreIO.ERROR) on error.public int read(long lbuf,
int boff,
int bin)
nxm.sys.lib.IOResourceread in class nxm.sys.lib.IOResourcelbuf - Native pointer to buffer.boff - The offset into buf to start at.bin - The number of bytes to try reading.CoreIO.ERROR) on error.IOResource.read(byte[], int, int)public int write(long lbuf,
int boff,
int bin)
nxm.sys.lib.IOResourcewrite in class nxm.sys.lib.IOResourcelbuf - Native pointer to buffer.boff - The offset into buf to start at.bin - The number of bytes to write out.public int write(byte[] buf,
int boff,
int bin)
nxm.sys.lib.IOResourcewrite in class nxm.sys.lib.IOResourcebuf - The byte buffer to write from.boff - The byte offset into the byte array to start writing from.bin - The number of bytes to try to write.public boolean seek(long soff)
seek in class nxm.sys.lib.IOResourcesoff - Current seek offset in bytes (0..N-1).public nxm.sys.lib.Table getStatFS()
nxm.sys.lib.IOResourcegetStatFS in class nxm.sys.lib.IOResourcepublic java.lang.String toString()
toString in class java.lang.Objectpublic long getDeviceSize()
public java.lang.String getPath()
public int getStripeSize()
public int getNumDevs()
public long getTotalLen()
public static long malloc(long size)
size - number of bytes to allocatepublic static int free_mem(long ptr)
ptr - pointer to the starting address to free