Copy the selected text by pressing ctrl+c

Code example for DataInputStream

* @param in the stream to read from
* @return the new version
* @throws IOException if an error occurs or the format is unknown
*/
public static Version read( DataInputStreamin ) throws IOException{
byte version = in.readByte();
if( version != 1 )
throw new IOException( "Unknown format for version" );
int major = in.readInt();
int minor = in.readInt();
int mikro = in.readInt();
Stringadd = in.readUTF();
return new Version( major, minor, mikro, add );
}
/**
* Checks whether this version is greater than the current version and
* throws an exception if so. This method is intended to be called from code
* that is loading some file, but other usages are possible as well.
* @throws IOException thrown if the current version is smaller than <code>this</code>.