Commit cb244683 by Michael Koch Committed by Michael Koch

Externalizable.java, [...]: Removed redundant modifiers.

2003-10-11  Michael Koch  <konqueror@gmx.de>

	* java/io/Externalizable.java,
	java/io/FileFilter.java,
	java/io/FilePermission.java,
	java/io/ObjectInput.java,
	java/io/ObjectInputValidation.java,
	java/io/ObjectOutput.java,
	java/io/ObjectStreamClass.java,
	java/io/ObjectStreamConstants.java,
	java/io/Serializable.java:
	Removed redundant modifiers.

From-SVN: r72352
parent 6a12e65c
2003-10-11 Michael Koch <konqueror@gmx.de>
* java/io/Externalizable.java,
java/io/FileFilter.java,
java/io/FilePermission.java,
java/io/ObjectInput.java,
java/io/ObjectInputValidation.java,
java/io/ObjectOutput.java,
java/io/ObjectStreamClass.java,
java/io/ObjectStreamConstants.java,
java/io/Serializable.java:
Removed redundant modifiers.
2003-10-11 Ingo Proetel <proetel@aicas.com>
* java/rmi/server/RMIClassLoader.java: Identify cached classloaders by
......
......@@ -60,7 +60,7 @@ package java.io;
*/
public interface Externalizable extends Serializable
{
static final long serialVersionUID = -282491828744381764L;
long serialVersionUID = -282491828744381764L;
/**
* This method restores an object's state by reading in the instance data
......@@ -86,7 +86,7 @@ public interface Externalizable extends Serializable
* restored cannot be found
* @exception IOException If any other error occurs
*/
public abstract void readExternal(ObjectInput in)
void readExternal(ObjectInput in)
throws ClassNotFoundException, IOException;
/**
......@@ -105,7 +105,5 @@ public interface Externalizable extends Serializable
*
* @exception IOException If an error occurs
*/
public abstract void writeExternal(ObjectOutput out) throws IOException;
} // interface Externalizable
void writeExternal(ObjectOutput out) throws IOException;
}
......@@ -52,7 +52,6 @@ package java.io;
*/
public interface FileFilter
{
/**
* This method determines whether or not a given pathname should be included
* in a pathname listing.
......@@ -62,7 +61,5 @@ public interface FileFilter
* @return <code>true</code> if the path should be included in the list,
* <code>false</code> otherwise.
*/
public abstract boolean accept(File pathname);
} // interface FileFilter
boolean accept(File pathname);
}
......@@ -189,12 +189,15 @@ public final class FilePermission extends Permission implements Serializable
public boolean implies(Permission p)
{
FilePermission fp;
if(!(p instanceof FilePermission))
return false;
fp = (FilePermission)p;
String f1 = getName();
String f2 = fp.getName();
if(f1.charAt(0) != File.separatorChar)
{
f1 = CURRENT_DIRECTORY + f1;
......@@ -204,7 +207,8 @@ public final class FilePermission extends Permission implements Serializable
f2 = CURRENT_DIRECTORY + f2;
}
String sub1, sub2a, sub2b;
String sub1;
switch(f1.charAt(f1.length() - 1))
{
case '*':
......
......@@ -58,7 +58,7 @@ public interface ObjectInput extends DataInput
*
* @exception IOException If an error occurs
*/
public abstract int available() throws IOException;
int available() throws IOException;
/**
* This method reading a byte of data from a stream. It returns that byte
......@@ -69,7 +69,7 @@ public interface ObjectInput extends DataInput
*
* @exception IOException If an error occurs
*/
public abstract int read() throws IOException;
int read() throws IOException;
/**
* This method reads raw bytes and stores them them a byte array buffer.
......@@ -83,7 +83,7 @@ public interface ObjectInput extends DataInput
*
* @exception IOException If an error occurs
*/
public abstract int read(byte[] buf) throws IOException;
int read(byte[] buf) throws IOException;
/**
* This method reads raw bytes and stores them in a byte array buffer
......@@ -102,7 +102,7 @@ public interface ObjectInput extends DataInput
*
* @exception IOException If an error occurs
*/
public abstract int read(byte[] buf, int offset, int len) throws IOException;
int read(byte[] buf, int offset, int len) throws IOException;
/**
* Reads an object instance and returns it. If the class for the object
......@@ -115,7 +115,7 @@ public interface ObjectInput extends DataInput
* found
* @exception IOException If any other error occurs
*/
public abstract Object readObject()
Object readObject()
throws ClassNotFoundException, IOException;
/**
......@@ -129,14 +129,12 @@ public interface ObjectInput extends DataInput
*
* @exception IOException If an error occurs
*/
public abstract long skip(long numBytes) throws IOException;
long skip(long numBytes) throws IOException;
/**
* This method closes the input source
*
* @exception IOException If an error occurs
*/
public abstract void close() throws IOException;
} // interface ObjectInput
void close() throws IOException;
}
......@@ -63,7 +63,5 @@ public interface ObjectInputValidation
*
* @exception InvalidObjectException If the object is invalid
*/
public abstract void validateObject() throws InvalidObjectException;
} // interface ObjectInputValidation
void validateObject() throws InvalidObjectException;
}
......@@ -57,7 +57,7 @@ public interface ObjectOutput extends DataOutput
*
* @exception IOException If an error occurs.
*/
public abstract void write(int b) throws IOException;
void write(int b) throws IOException;
/**
* This method writes all the bytes in the specified byte array to the
......@@ -67,7 +67,7 @@ public interface ObjectOutput extends DataOutput
*
* @exception IOException If an error occurs.
*/
public abstract void write(byte[] buf) throws IOException;
void write(byte[] buf) throws IOException;
/**
* This method writes <code>len</code> bytes from the specified array
......@@ -79,7 +79,7 @@ public interface ObjectOutput extends DataOutput
*
* @exception IOException If an error occurs.
*/
public abstract void write(byte[] buf, int offset, int len)
void write(byte[] buf, int offset, int len)
throws IOException;
/**
......@@ -90,7 +90,7 @@ public interface ObjectOutput extends DataOutput
*
* @exception IOException If an error occurs
*/
public abstract void writeObject(Object obj) throws IOException;
void writeObject(Object obj) throws IOException;
/**
* This method causes any buffered data to be flushed out to the underlying
......@@ -98,14 +98,14 @@ public interface ObjectOutput extends DataOutput
*
* @exception IOException If an error occurs
*/
public abstract void flush() throws IOException;
void flush() throws IOException;
/**
* This method closes the underlying stream.
*
* @exception IOException If an error occurs
*/
public abstract void close() throws IOException;
void close() throws IOException;
} // interface ObjectOutput
......@@ -249,8 +249,6 @@ public class ObjectStreamClass implements Serializable
{
ObjectStreamClass osc = ObjectStreamClass.lookup (clazz);
ObjectStreamClass[] ret_val;
if (osc == null)
return new ObjectStreamClass[0];
else
......
......@@ -49,41 +49,41 @@ package java.io;
public interface ObjectStreamConstants
{
// FIXME: Javadoc comment these values.
public final static int PROTOCOL_VERSION_1 = 1;
public final static int PROTOCOL_VERSION_2 = 2;
final static short STREAM_MAGIC = (short)0xaced;
final static short STREAM_VERSION = 5;
final static byte TC_NULL = (byte)112; //0x70
final static byte TC_REFERENCE = (byte)113; //0x71
final static byte TC_CLASSDESC = (byte)114; //0x72
final static byte TC_OBJECT = (byte)115; //0x73
final static byte TC_STRING = (byte)116; //0x74
final static byte TC_ARRAY = (byte)117; //0x75
final static byte TC_CLASS = (byte)118; //0x76
final static byte TC_BLOCKDATA = (byte)119; //0x77
final static byte TC_ENDBLOCKDATA = (byte)120; //0x78
final static byte TC_RESET = (byte)121; //0x79
final static byte TC_BLOCKDATALONG = (byte)122; //0x7A
final static byte TC_EXCEPTION = (byte)123; //0x7B
final static byte TC_LONGSTRING = (byte)124; //0x7C
final static byte TC_PROXYCLASSDESC = (byte)125; //0x7D
final static byte TC_BASE = TC_NULL;
final static byte TC_MAX = TC_PROXYCLASSDESC;
final static int baseWireHandle = 0x7e0000;
final static byte SC_WRITE_METHOD = 0x01;
final static byte SC_SERIALIZABLE = 0x02;
final static byte SC_EXTERNALIZABLE = 0x04;
final static byte SC_BLOCK_DATA = 0x08;
final static SerializablePermission SUBSTITUTION_PERMISSION
int PROTOCOL_VERSION_1 = 1;
int PROTOCOL_VERSION_2 = 2;
short STREAM_MAGIC = (short)0xaced;
short STREAM_VERSION = 5;
byte TC_NULL = (byte)112; //0x70
byte TC_REFERENCE = (byte)113; //0x71
byte TC_CLASSDESC = (byte)114; //0x72
byte TC_OBJECT = (byte)115; //0x73
byte TC_STRING = (byte)116; //0x74
byte TC_ARRAY = (byte)117; //0x75
byte TC_CLASS = (byte)118; //0x76
byte TC_BLOCKDATA = (byte)119; //0x77
byte TC_ENDBLOCKDATA = (byte)120; //0x78
byte TC_RESET = (byte)121; //0x79
byte TC_BLOCKDATALONG = (byte)122; //0x7A
byte TC_EXCEPTION = (byte)123; //0x7B
byte TC_LONGSTRING = (byte)124; //0x7C
byte TC_PROXYCLASSDESC = (byte)125; //0x7D
byte TC_BASE = TC_NULL;
byte TC_MAX = TC_PROXYCLASSDESC;
int baseWireHandle = 0x7e0000;
byte SC_WRITE_METHOD = 0x01;
byte SC_SERIALIZABLE = 0x02;
byte SC_EXTERNALIZABLE = 0x04;
byte SC_BLOCK_DATA = 0x08;
SerializablePermission SUBSTITUTION_PERMISSION
= new SerializablePermission("enableSubstitution");
final static SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION
= new SerializablePermission("enableSubclassImplementation");
}
......@@ -51,5 +51,5 @@ package java.io;
*/
public interface Serializable
{
static final long serialVersionUID = 1196656838076753133L;
long serialVersionUID = 1196656838076753133L;
} // interface Serializable
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment