blob: bdbd065541811a49538e9763b368cd95ae0b3782 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
*/
|