edu.utah.janosvm.kit.server.memfs
Class MemoryFileOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--edu.utah.janosvm.kit.server.memfs.MemoryFileOutputStream
- public class MemoryFileOutputStream
- extends java.io.OutputStream
An OutputStream for a MemoryFileSystem file.
Field Summary |
private int |
cursor
The current location in the file. |
private MemoryBlock |
mb
The handle on the memory block in the server team. |
Constructor Summary |
MemoryFileOutputStream(java.lang.String fileName)
Construct a MemoryFileOutputStream that writes to the given file. |
MemoryFileOutputStream(java.lang.String fileName,
boolean append)
Construct a MemoryFileOutputStream that writes to the given file. |
Methods inherited from class java.io.OutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
mb
private final MemoryBlock mb
- The handle on the memory block in the server team.
cursor
private int cursor
- The current location in the file.
MemoryFileOutputStream
public MemoryFileOutputStream(java.lang.String fileName,
boolean append)
throws java.io.FileNotFoundException
- Construct a MemoryFileOutputStream that writes to the given file.
- Parameters:
fileName
- The name of the file in the MemoryFileSystem.append
- If true, the anything written to the file will be
appended.- Throws:
Throws
- a FileNotFoundException if the file couldn't be
found or the server team was unreachable.
MemoryFileOutputStream
public MemoryFileOutputStream(java.lang.String fileName)
throws java.io.FileNotFoundException
- Construct a MemoryFileOutputStream that writes to the given file.
- Parameters:
fileName
- The name of the file in the MemoryFileSystem.- Throws:
Throws
- a FileNotFoundException if the file couldn't be
found or the server team was unreachable.
write
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(int i)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class java.io.OutputStream
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.OutputStream
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003