All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.roguewave.vsj.PortableInputStream
Each method that reads data is meant to be used in conjuction with a specific RWpostream or PortableOutputStream method that wrote the data. These correspondences are given in the method descriptions below.
With regard to naming conventions, you'll note that C++ methods in RWpistream that overload the extraction operator are provided here as method names beginning with extract. For example,
RWvistream& RWpistream::operator>>(char&);is represented here as
char PortableInputStream.extractChar();Also, because we can't directly pass basic types by reference in Java, the input methods take no parameters but return the value instead. This, in turn, means that we can't overload the method names as we do in C++, thus we include the type in the name as with extractChar(), extractInt(), etc.
Finally, we use widening, where we can, to deal with C++ basic types such as unsigned int that don't have Java counterparts. For example, the method
long PortableInputStream.extractUnsignedInt()returns a long since the range of a typical C++ unsigned int contains values that won't necessarily fit into a Java int. While we've done our best to ensure that the types we return can hold any value read from the stream, in the end we cannot guarantee this since ranges of basic types in C++ are implementation defined.
protected PushbackReader istr_
protected RestoreContext restoreContext_
public PortableInputStream(InputStream istr)
public PortableInputStream(InputStream istr, RestoreContext readtable)
public Object restoreObject(ObjectStreamer streamer) throws IOException
Note that ObjectStreamers for certain classes in Tools.h++, JTools, and the JDK are supplied with this product. See the User's Guide.
public RestoreContext getRestoreContext()
public String getString(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::putString(const char*, size_t) | PortableOutputStream.putString(String, int) |
public char extractChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(char) | PortableOutputStream.insertChar(char) |
public char getChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(char) | PortableOutputStream.putChar(char) |
public char extractWChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(wchar_t) | PortableOutputStream.insertWChar(char) |
public char getWChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(wchar_t) | PortableOutputStream.putWChar(char) |
public char extractUnsignedChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(unsigned char) | PortableOutputStream.insertUnsignedChar(char) |
public char getUnsignedChar() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(unsigned char) | PortableOutputStream.putUnsignedChar(char) |
public double extractDouble() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(double) | PortableOutputStream.insertDouble(double) |
public float extractFloat() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(float) | PortableOutputStream.insertFloat(float) |
public int extractInt() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(int) | PortableOutputStream.insertInt(int) |
public long extractUnsignedInt() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(unsigned int) | PortableOutputStream.insertUnsignedInt(long) |
public short extractShort() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(short) | PortableOutputStream.insertShort(short) |
public int extractUnsignedShort() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(unsigned short) | PortableOutputStream.insertUnsignedShort(int) |
public long extractLong() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(long) | PortableOutputStream.insertLong(long) |
public long extractUnsignedLong() throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::operator<<(unsigned long) | PortableOutputStream.insertUnsignedLong(long) |
public char[] getChars(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const char*, size_t) | PortableOutputStream.putChars(char[], int) |
public char[] getWChars(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const wchar_t*, size_t) | PortableOutputStream.putWChars(char[], int) |
public char[] getUnsignedChars(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const unsigned char*, size_t) | PortableOutputStream.putUnsignedChars(char[], int) |
public double[] getDoubles(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const double*, size_t) | PortableOutputStream.putDoubles(double[], int) |
public float[] getFloats(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const float*, size_t) | PortableOutputStream.putFloats(float[], int) |
public int[] getInts(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const int*, size_t) | PortableOutputStream.putInts(int[], int) |
public long[] getUnsignedInts(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const unsigned int*, size_t) | PortableOutputStream.putunsignedInt(long[], int) |
public short[] getShorts(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const short*, size_t) | PortableOutputStream.putShorts(short[], int) |
public int[] getUnsignedShorts(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const unsigned short*, size_t) | PortableOutputStream.putUnsignedShorts(int[], int) |
public long[] getLongs(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const long*, size_t) | PortableOutputStream.putLong(long[], int) |
public long[] getUnsignedLongs(int count) throws IOException
Corresponding output functions: | |
From C++ | From Java |
---|---|
RWpostream::put(const unsigned long*, size_t) | PortableOutputStream.putUnsignedLong(long[], int) |
All Packages Class Hierarchy This Package Previous Next Index