From 85ff7ae885fbdfac982e30b0b3f5b9dd05a0231b Mon Sep 17 00:00:00 2001 From: John Date: Mon, 20 Jun 2022 18:23:18 -0700 Subject: [PATCH] Make stuff private again --- src/BufferedImageWrapper.java | 4 ++-- src/SoundWrapper.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BufferedImageWrapper.java b/src/BufferedImageWrapper.java index 9d7aae4..dfc96aa 100644 --- a/src/BufferedImageWrapper.java +++ b/src/BufferedImageWrapper.java @@ -57,7 +57,7 @@ public class BufferedImageWrapper implements Serializable { // custom writeObject method that allows writing an otherwise unserializable method to disk @Serial - public void writeObject(ObjectOutputStream out) throws IOException { + private void writeObject(ObjectOutputStream out) throws IOException { // save whether the image is flipped out.writeObject(flipImage); // if the imageString is present, write that to disk to prevent excessive disk writes @@ -70,7 +70,7 @@ public class BufferedImageWrapper implements Serializable { // custom readObject method that allows reading an otherwise unserializable method from disk @Serial - public void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { Object o; // read whether the image is flipped or not flipImage = (Boolean)in.readObject(); diff --git a/src/SoundWrapper.java b/src/SoundWrapper.java index a2f48db..db89c74 100644 --- a/src/SoundWrapper.java +++ b/src/SoundWrapper.java @@ -21,13 +21,13 @@ public class SoundWrapper implements Serializable { public SoundWrapper() {} @Serial - public void writeObject(ObjectOutputStream out) throws IOException { + private void writeObject(ObjectOutputStream out) throws IOException { // write location of .wav file (soundString) out.writeObject(soundString); } @Serial - public void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException, UnsupportedAudioFileException, LineUnavailableException { + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException, UnsupportedAudioFileException, LineUnavailableException { // read .wav file located at soundString Object o; o = in.readObject();