org.multijava.util.classfile
Class ClassPath.Data
java.lang.Object
org.multijava.util.classfile.ClassPath.Data
- Enclosing class:
- ClassPath
- public static class ClassPath.Data
- extends java.lang.Object
This class mimics a DataInput, but optimizes the reading of the supplied InputStream.
The InputStream is read in one fell swoop into a data array - presumes that such reading
is efficient and that the data array does not need to be too big.
|
Field Summary |
private byte[] |
ba
|
private java.io.InputStream |
is
|
private static java.util.Stack |
stack
|
|
Method Summary |
private static byte[] |
getByteArray()
Returns a free byte array. |
java.io.DataInput |
getDataInput()
|
void |
release()
|
private static void |
release(byte[] arr)
Releases a byte array, adding it to the free list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
is
private java.io.InputStream is
ba
private byte[] ba
stack
private static java.util.Stack stack
ClassPath.Data
public ClassPath.Data(java.io.InputStream is)
getDataInput
public java.io.DataInput getDataInput()
throws java.io.IOException
- Throws:
java.io.IOException
release
public void release()
getByteArray
private static byte[] getByteArray()
- Returns a free byte array.
release
private static void release(byte[] arr)
- Releases a byte array, adding it to the free list.
mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.