diff options
author | Tom Tromey <tromey@redhat.com> | 2006-02-12 18:35:41 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2006-02-12 18:35:41 +0000 |
commit | d9884517da4afdb686f1f5f579309714bbcd9bc1 (patch) | |
tree | 792144a2e3f948beb49af9248f11f6249c1b646b /javax/sound | |
parent | 6dbefa260f8239c9cf70fb48a2c306cb360857d2 (diff) | |
download | classpath-d9884517da4afdb686f1f5f579309714bbcd9bc1.tar.gz |
* javax/sound/sampled/LineEvent.java (readObject): New method.
(writeObject): Likewise.
(serialVersionUID): New field.
Diffstat (limited to 'javax/sound')
-rw-r--r-- | javax/sound/sampled/LineEvent.java | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/javax/sound/sampled/LineEvent.java b/javax/sound/sampled/LineEvent.java index 7bba2cd1d..db925935b 100644 --- a/javax/sound/sampled/LineEvent.java +++ b/javax/sound/sampled/LineEvent.java @@ -38,16 +38,24 @@ exception statement from your version. */ package javax.sound.sampled; +import java.io.IOException; +import java.io.NotSerializableException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.EventObject; -// FIXME: attempts to serialize this should fail - /** * This class holds information about a state change of a Line. + * @specnote This class is not really serializable, and attempts to + * serialize it will throw {@link NotSerializableException}. * @since 1.3 */ public class LineEvent extends EventObject { + // We define this even though this class can't be serialized, in + // order to placate the compiler. + private static final long serialVersionUID = -1274246333383880410L; + /** * This class represents the kinds of state changes that can occur * to a Line. The standard states are availabe as static instances. @@ -147,4 +155,16 @@ public class LineEvent extends EventObject return ("type=" + type + "; framePosition=" + framePosition + "line=" + line); } + + private void readObject(ObjectInputStream ois) + throws IOException + { + throw new NotSerializableException("LineEvent is not serializable"); + } + + private void writeObject(ObjectOutputStream oos) + throws IOException + { + throw new NotSerializableException("LineEvent is not serializable"); + } } |