-
Notifications
You must be signed in to change notification settings - Fork 1
/
MultiFileStorage.java
223 lines (191 loc) · 6.37 KB
/
MultiFileStorage.java
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import java.util.ArrayList;
import javafx.util.Pair;
// Implementation for Accessing Physical Storage of Data across multiple files
//
public class MultiFileStorage extends Storage {
// Constructor: initialize name of collection in storage
MultiFileStorage( String collection )
{
super( collection );
}
// Implementation for opening (connecting) to storage
public void Open()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Open" );
}
// Implementation for closing (disconnecting) from storage
public void Close()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Close" );
}
// Implementation for seeking to the begin in storage
public void Begin()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Begin" );
}
// Implementation for seeking to the end in storage
public void End()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.End" );
}
// Implementation for returning current location in storage
public long Pos()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Pos" );
}
// Implementation for moving to a location in storage
public void Move( long pos )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Move" );
}
// Implementation for checking if at end of file in storage
public boolean Eof()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Eof" );
}
// Implementation for writing a padded String to storage
public void Write( String value, int length )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.string" );
}
// Implementation for writing a String to storage
public void Write( String value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.string" );
}
// Implementation for writing a byte to storage
public void Write( byte value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.byte" );
}
// Implementation for writing a short to storage
public void Write( Short value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.short" );
}
// Implementation for writing an Integer to storage
public void Write( Integer value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.integer" );
}
// Implementation for writing a Long Integer to storage
public void Write( Long value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.long" );
}
// Implementation for writing a Float to storage
public void Write( Float value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.float" );
}
// Implementation for writing a Double to storage
public void Write( Double value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.double" );
}
// Implementation for writing a Boolean to storage
public void Write( Boolean value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.boolean" );
}
// Implementation for writing a line to storage
public void WriteLine( String value )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.line" );
}
// Implementation for writing an index to storage
public void Write( Index index )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.index" );
}
// Implementation for reading a string from storage
public String Read( int length )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.string" );
}
// Implementation for reading a byte from storage
public byte ReadByte()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.byte" );
}
// Implementation for reading an Integer from storage
public Integer ReadInt()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.integer" );
}
// Implementation for reading a Short from storage
public Short ReadShort()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.short" );
}
// Implementation for reading a Long from storage
public Long ReadLong()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.long" );
}
// Implementation for reading a float from storage
public float ReadFloat()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.float" );
}
// Implementation for reading a double from storage
public double ReadDouble()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.double" );
}
// Implementation for reading a boolean from storage
public Boolean ReadBoolean()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.boolean" );
}
// Implementation for reading a line from storage
public String ReadLine()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.line" );
}
// Implementation for reading an index from storage
public ArrayList<long[]> ReadIndex()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Read.index" );
}
// Implementation to Write out schema to storage
public void Write( Schema schema )
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.schema" );
}
// Implementation to Read in schema from storage
public ArrayList<Pair<String,String>> ReadSchema()
throws UnsupportedOperationException
{
throw new UnsupportedOperationException( "MultiFileStorage.Write.read" );
}
}