Imported GNU Classpath 0.90
Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. From-SVN: r113887
This commit is contained in:
parent
eaec4980e1
commit
4f9533c772
1640 changed files with 126485 additions and 104808 deletions
|
@ -549,53 +549,37 @@ public class ObjectOutputStream extends OutputStream
|
|||
* different protocols, specified by <code>PROTOCOL_VERSION_1</code>
|
||||
* and <code>PROTOCOL_VERSION_2</code>. This implementation writes
|
||||
* data using <code>PROTOCOL_VERSION_2</code> by default, as is done
|
||||
* by the JDK 1.2.
|
||||
*
|
||||
* A non-portable method, <code>setDefaultProtocolVersion (int
|
||||
* version)</code> is provided to change the default protocol
|
||||
* version.
|
||||
*
|
||||
* since the JDK 1.2.
|
||||
* <p>
|
||||
* For an explanation of the differences between the two protocols
|
||||
* see XXX: the Java ObjectSerialization Specification.
|
||||
*
|
||||
* @exception IOException if <code>version</code> is not a valid
|
||||
* protocol
|
||||
*
|
||||
* @see #setDefaultProtocolVersion(int)
|
||||
* see the Java Object Serialization Specification.
|
||||
* </p>
|
||||
*
|
||||
* @param version the version to use.
|
||||
*
|
||||
* @throws IllegalArgumentException if <code>version</code> is not a valid
|
||||
* protocol.
|
||||
* @throws IllegalStateException if called after the first the first object
|
||||
* was serialized.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*
|
||||
* @see ObjectStreamConstants#PROTOCOL_VERSION_1
|
||||
* @see ObjectStreamConstants#PROTOCOL_VERSION_2
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public void useProtocolVersion(int version) throws IOException
|
||||
{
|
||||
if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2)
|
||||
throw new IOException("Invalid protocol version requested.");
|
||||
throw new IllegalArgumentException("Invalid protocol version requested.");
|
||||
|
||||
if (nextOID != baseWireHandle)
|
||||
throw new IllegalStateException("Protocol version cannot be changed "
|
||||
+ "after serialization started.");
|
||||
|
||||
protocolVersion = version;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <em>GNU $classpath specific</em>
|
||||
*
|
||||
* Changes the default stream protocol used by all
|
||||
* <code>ObjectOutputStream</code>s. There are currently two
|
||||
* different protocols, specified by <code>PROTOCOL_VERSION_1</code>
|
||||
* and <code>PROTOCOL_VERSION_2</code>. The default default is
|
||||
* <code>PROTOCOL_VERSION_1</code>.
|
||||
*
|
||||
* @exception IOException if <code>version</code> is not a valid
|
||||
* protocol
|
||||
*
|
||||
* @see #useProtocolVersion(int)
|
||||
*/
|
||||
public static void setDefaultProtocolVersion(int version)
|
||||
throws IOException
|
||||
{
|
||||
if (version != PROTOCOL_VERSION_1 && version != PROTOCOL_VERSION_2)
|
||||
throw new IOException("Invalid protocol version requested.");
|
||||
|
||||
defaultProtocolVersion = version;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An empty hook that allows subclasses to write extra information
|
||||
* about classes to the stream. This method is called the first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue