JanosVM v1.0 API

edu.utah.janosvm.kit.server.memfs
Class MemoryFileInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--edu.utah.janosvm.kit.server.memfs.MemoryFileInputStream

public class MemoryFileInputStream
extends java.io.InputStream

An InputStream 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.
 
Fields inherited from class java.io.InputStream
SKIP_BUFFER_SIZE, skipBuffer
 
Constructor Summary
MemoryFileInputStream(java.lang.String fileName)
          Construct a MemoryFileInputStream that reads from the given file.
 
Method Summary
 int read()
           
 int read(byte[] buffer, int offset, int length)
           
 java.lang.String toString()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

Field Detail

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.
Constructor Detail

MemoryFileInputStream

public MemoryFileInputStream(java.lang.String fileName)
                      throws java.io.FileNotFoundException
Construct a MemoryFileInputStream that reads from 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.
Method Detail

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.InputStream

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JanosVM v1.0 API

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