summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/CDDiskInfo.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/CDDiskInfo.java
downloadworlds.jar-main.tar.xz
worlds.jar-main.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/CDDiskInfo.java')
-rw-r--r--NET/worlds/scape/CDDiskInfo.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/NET/worlds/scape/CDDiskInfo.java b/NET/worlds/scape/CDDiskInfo.java
new file mode 100644
index 0000000..bdbd065
--- /dev/null
+++ b/NET/worlds/scape/CDDiskInfo.java
@@ -0,0 +1,86 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import java.io.IOException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class CDDiskInfo
+/* */ implements Persister
+/* */ {
+/* */ private String artist;
+/* */ private String title;
+/* */ private String category;
+/* */ private String[] trackNames;
+/* */
+/* */ public CDDiskInfo(String artist, String title, String category, String[] trackNames)
+/* */ {
+/* 19 */ this.artist = artist;
+/* 20 */ this.title = title;
+/* 21 */ this.category = category;
+/* 22 */ this.trackNames = new String[trackNames.length];
+/* 23 */ System.arraycopy(trackNames, 0, this.trackNames, 0,
+/* 24 */ trackNames.length);
+/* */ }
+/* */
+/* */ public CDDiskInfo() {}
+/* */
+/* 29 */ public String getArtist() { return this.artist; }
+/* 30 */ public String getTitle() { return this.title; }
+/* 31 */ public String getCategory() { return this.category; }
+/* 32 */ public int getNumTracks() { return this.trackNames.length; }
+/* 33 */ public String getTrackName(int track) { return this.trackNames[track]; }
+/* */
+/* */ public String toString()
+/* */ {
+/* 37 */ String ret = "Artist: " + this.artist + "\n" +
+/* 38 */ "Title: " + this.title + "\n" +
+/* 39 */ "Category: " + this.category + "\n";
+/* 40 */ for (int i = 0; i < this.trackNames.length; i++) {
+/* 41 */ ret = ret + "Track " + (i + 1) + ":";
+/* 42 */ if (this.trackNames[i] != null)
+/* 43 */ ret = ret + this.trackNames[i];
+/* 44 */ ret = ret + "\n";
+/* */ }
+/* 46 */ return ret;
+/* */ }
+/* */
+/* 49 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 53 */ s.saveVersion(1, classCookie);
+/* 54 */ s.saveString(this.artist);
+/* 55 */ s.saveString(this.title);
+/* 56 */ s.saveString(this.category);
+/* 57 */ s.saveInt(this.trackNames.length);
+/* 58 */ for (int i = 0; i < this.trackNames.length; i++) {
+/* 59 */ s.saveString(this.trackNames[i]);
+/* */ }
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r) throws IOException, TooNewException {
+/* 64 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 1:
+/* 66 */ this.artist = r.restoreString();
+/* 67 */ this.title = r.restoreString();
+/* 68 */ this.category = r.restoreString();
+/* 69 */ this.trackNames = new String[r.restoreInt()];
+/* 70 */ for (int i = 0; i < this.trackNames.length; i++)
+/* 71 */ this.trackNames[i] = r.restoreString();
+/* 72 */ break;
+/* */
+/* */ default:
+/* 75 */ throw new TooNewException();
+/* */ }
+/* */ }
+/* */
+/* */ public void postRestore(int version) {}
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDiskInfo.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file