|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
com.yobotics.simulationconstructionset.YoDataInputStream
public class YoDataInputStream
This class is a drop-in replacement for DataInputStream. It exposes all of the same public interface, and only possesses one "additional" method:
readASCIILine(). This method is an exact duplicate of the
readLine()method from DataInputStream. It only has a new name because the original method is final and so can't be overridden. This class was created to get around the deprecation issues with the original method. Should the old method be removed from DataInputStream in future releases, we will be able to retain the functionality.
Constructor Summary | |
---|---|
YoDataInputStream(java.io.InputStream in)
|
Method Summary | |
---|---|
java.lang.String |
readASCIILine()
This is a direct copy of the deprecated method |
Methods inherited from class java.io.DataInputStream |
---|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public YoDataInputStream(java.io.InputStream in)
Method Detail |
---|
public final java.lang.String readASCIILine() throws java.io.IOException
readLine()from DataInputStream. It has been renamed to
readASCIILine()because of the
finalstatus of the method, as it can't be overridden. This method is only in place to preserve the functionality of the readLine method in spite of its deprecation. Cursory analysis indicates that the only reason the is deprecated is that it doesn't gracefully handle UTF encoded data; because all of our text data is encoded in ASCII and because our randomly generated unit tests routinely pass, we will hold to the idea that this method satisfies our needs and that we shouldn't worry about the deprecation issue. We have created this method in order to continue using its functionality in the event that the deprecation leads to the code being removed from future JDK/JRE releases.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |