public class FileSystem extends Object
| Constructor and Description |
|---|
FileSystem() |
| Modifier and Type | Method and Description |
|---|---|
static void |
initializeStandardStreams()
Called from VM.boot to set up java.lang.System.in, java.lang.System.out,
and java.lang.System.err
|
static int |
readByte(int fd)
Read single byte from file.
|
static int |
readBytes(int fd,
byte[] buf,
int off,
int cnt)
Reads multiple bytes.
|
static int |
writeByte(int fd,
int b)
Write single byte to file
|
static int |
writeBytes(int fd,
byte[] buf,
int off,
int cnt)
Writes multiple bytes.
|
public FileSystem()
public static int readByte(int fd)
fd - file descriptorpublic static int writeByte(int fd, int b)
fd - file descriptorb - byte to be writtenpublic static int readBytes(int fd, byte[] buf, int off, int cnt)
fd - the file descriptor for the file that should be read frombuf - a pinned byte array to read intooff - the offset in the buffer to read intocnt - the number of bytes to readpublic static int writeBytes(int fd, byte[] buf, int off, int cnt)
fd - the file descriptor for the file that should be written tobuf - a pinned byte array to write fromoff - the offset in the buffer to start writing fromcnt - the number of bytes to writepublic static void initializeStandardStreams()