| Method and Description |
|---|
| java.lang.ClassLoader.defineClass(byte[], int, int)
Replaced by
defineClass(String, byte[], int, int) |
| java.lang.String.getBytes(int, int, byte[], int)
This method does not properly convert characters into
bytes. As of JDK 1.1, the preferred way to do this is via the
String.getBytes() method, which uses the platform's default charset. |
| java.lang.Character.isSpace(char)
Replaced by isWhitespace(char).
|
| java.io.ObjectInputStream.readLine()
This method does not properly convert bytes to characters.
see DataInputStream for the details and alternatives.
|
| java.io.DataInputStream.readLine()
This method does not properly convert bytes to characters.
As of JDK 1.1, the preferred way to read lines of text is via the
BufferedReader.readLine() method. Programs that use the
DataInputStream class to read lines can be converted to use
the BufferedReader class by replacing code of the form:
with:
|
| java.net.URLStreamHandler.setURL(URL, String, String, int, String, String)
Use setURL(URL, String, String, int, String, String, String,
String);
|
| java.io.ByteArrayOutputStream.toString(int)
This method does not properly convert bytes into characters.
As of JDK 1.1, the preferred way to do this is via the
toString(String enc) method, which takes an encoding-name
argument, or the toString() method, which uses the
platform's default character encoding. |
| java.io.ObjectOutputStream.PutField.write(ObjectOutput)
This method does not write the values contained by this
PutField object in a proper format, and may
result in corruption of the serialization stream. The
correct way to write PutField data is by
calling the ObjectOutputStream.writeFields()
method. |
| Constructor and Description |
|---|
| java.lang.String(byte[], int)
This method does not properly convert bytes into
characters. As of JDK 1.1, the preferred way to do this is via the
String constructors that take a Charset, charset name, or that use the platform's
default charset. |
| java.lang.String(byte[], int, int, int)
This method does not properly convert bytes into characters.
As of JDK 1.1, the preferred way to do this is via the
String constructors that take a Charset, charset name, or that use the platform's
default charset. |
Copyright © 2013 API Design. All Rights Reserved.