Java Reference
In-Depth Information
ByteArrayOutputStream bos = new
ByteArrayOutputStream();
OutputStreamWriter sw = new
OutputStreamWriter (bos);
// ... write to sw
String s = new String
(bos.getByteArray
());
instead of
StringWriter sw = new StringWriter();
// ... write to sw
S tring s = sw.toString();
Writer
F ully available in CLDC.
Table B.59. Exceptions of the java.io Package
J2SE Exception
Availability in CLDC
CharConversionException
Not available in CLDC.
EOFException
Available in CLDC.
FileNotFoundException
Not available in CLDC.
InterruptedIOException
Available in CLDC.
InvalidClassException
Not available in CLDC.
InvalidObjectException
Not available in CLDC.
IOException
Available in CLDC.
NotActiveException
Not available in CLDC.
NotSerializableException
Not available in CLDC.
ObjectStreamException
Not available in CLDC.
OptionalDataException
Not available in CLDC.
StreamCorruptedException
Not available in CLDC.
SyncFailedException
Not available in CLDC.
UnsupportedEncodingException
Available in CLDC.
UTFDataFormatException
Available in CLDC.
WriteAbortedException
Not available in CLDC.
DataInput
Table B.60. Methods of the Class Data I nput
Method
Alternative/Workaround
DataInputStream(InputStream in)
Available in CLDC.
boolean readBoolean()
Available in CLDC.
byte readByte()
Available in CLDC.
char readChar()
Available in CLDC.
double readDouble()
Available in CLDC-NG.
float readFloat()
Available in CLDC-NG.
void readFully(byte[] b)
Available in CLDC.
void readFully(byte[] b, int off, int len)
Available in CLDC.
int readInt()
Available in CLDC.
String readLine()
Not available in CLDC.
long readLong()
Available in CLDC.
short readShort()
Available in CLDC.
Search WWH ::




Custom Search