Skip to content

Commit ce35c9d

Browse files
committed
[doc] Add missing Javadoc
1 parent fa131d4 commit ce35c9d

23 files changed

Lines changed: 325 additions & 55 deletions

exist-core/src/main/java/org/exist/dom/persistent/DocumentImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ public String getMimeType() {
504504
/**
505505
* Set the Internet Media Type of the document.
506506
*
507+
* @param mimeType the mime type.
508+
*
507509
* @deprecated Use {@link #setMediaType(String)} instead.
508510
*/
509511
@Deprecated
@@ -522,6 +524,8 @@ public String getMediaType() {
522524

523525
/**
524526
* Set the Internet Media Type of the document.
527+
*
528+
* @param mediaType the Internet Media Type.
525529
*/
526530
public void setMediaType(final String mediaType) {
527531
this.mediaType = mediaType;

exist-core/src/main/java/org/exist/storage/io/VariableByteInput.java

Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,44 +65,61 @@ public interface VariableByteInput {
6565
* Read a single byte and return as an int value.
6666
*
6767
* @return the byte value as int or -1 if no more bytes are available.
68-
* @throws IOException in case of an I/O error
68+
*
69+
* @throws IOException in case of an I/O error.
6970
*/
7071
int read() throws IOException;
7172

7273
/**
7374
* Fill the provided byte array with data from the input.
7475
*
75-
* @param data the buffer to read
76+
* @param data the buffer to write data to.
77+
*
78+
* @return the number of bytes written to the buffer.
79+
*
7680
* @throws IOException in case of an I/O error
77-
* @return the number of bytes read
7881
*/
7982
int read(byte[] data) throws IOException;
80-
81-
int read(byte b[], int off, int len) throws IOException;
83+
84+
/**
85+
* Fill the provided byte array with data from the input.
86+
*
87+
* @param data the buffer to write data to.
88+
* @param off the offset in the buffer to start writing at.
89+
* @param len the maximum number of bytes to write into the buffer.
90+
*
91+
* @return the number of bytes written to the buffer.
92+
*
93+
* @throws IOException in case of an I/O error.
94+
*/
95+
int read(byte data[], int off, int len) throws IOException;
8296

8397
/**
8498
* Returns a value > 0 if more bytes can be read
8599
* from the input.
86100
*
87-
* @throws IOException in case of an I/O error
88-
* @return the number of bytes available
101+
* @return the number of bytes available.
102+
*
103+
* @throws IOException in case of an I/O error.
89104
*/
90105
int available() throws IOException;
91106

92107
/**
93108
* Read a single byte. Throws EOFException if no
94109
* more bytes are available.
95110
*
96-
* @throws IOException in case of an I/O error
97-
* @return the byte read
111+
* @return the byte read.
112+
*
113+
* @throws IOException in case of an I/O error.
98114
*/
99115
byte readByte() throws IOException;
100116

101117
/**
102118
* Read a short value in variable byte encoding.
103119
*
104-
* @throws IOException in case of an I/O error
105-
* @return the short read
120+
* @return the short read.
121+
*
122+
* @throws IOException in case of an I/O error.
106123
*/
107124
short readShort() throws IOException;
108125

@@ -112,14 +129,17 @@ public interface VariableByteInput {
112129
* Requires 2 bytes.
113130
*
114131
* @return the short.
132+
*
133+
* @throws IOException in case of an I/O error.
115134
*/
116135
short readFixedShort() throws IOException;
117136

118137
/**
119138
* Read an integer value in variable byte encoding.
120139
*
121-
* @throws IOException in case of an I/O error
122-
* @return the int read
140+
* @return the int read.
141+
*
142+
* @throws IOException in case of an I/O error.
123143
*/
124144
int readInt() throws IOException;
125145

@@ -129,14 +149,17 @@ public interface VariableByteInput {
129149
* Requires 4 bytes.
130150
*
131151
* @return the int.
152+
*
153+
* @throws IOException in case of an I/O error.
132154
*/
133155
int readFixedInt() throws IOException;
134156

135157
/**
136158
* Read a long value in variable byte encoding.
137159
*
138-
* @throws IOException in case of an I/O error
139-
* @return the long read
160+
* @return the long read.
161+
*
162+
* @throws IOException in case of an I/O error.
140163
*/
141164
long readLong() throws IOException;
142165

@@ -146,83 +169,104 @@ public interface VariableByteInput {
146169
* Requires 8 bytes.
147170
*
148171
* @return the long.
172+
*
173+
* @throws IOException in case of an I/O error.
149174
*/
150175
long readFixedLong() throws IOException;
151176

152177
/**
153178
* Read a big integer in variable byte encoding.
154179
*
155-
* @throws IOException in case of an I/O error
180+
* @return the big integer read.
156181
*
157-
* @return the big integer read
182+
* @throws IOException in case of an I/O error.
158183
*/
159184
BigInteger readBigInteger() throws IOException;
160185

161186
/**
162187
* Read a fixed size big integer from input.
163188
*
164-
* @throws IOException in case of an I/O error
189+
* @return the big integer read.
165190
*
166-
* @return the big integer read
191+
* @throws IOException in case of an I/O error.
167192
*/
168193
BigInteger readFixedBigInteger() throws IOException;
169194

170195
/**
171196
* Read a big decimal in variable byte encoding.
172197
*
173-
* @throws IOException in case of an I/O error
198+
* @return the big decimal read.
174199
*
175-
* @return the big decimal read
200+
* @throws IOException in case of an I/O error.
176201
*/
177202
BigDecimal readBigDecimal() throws IOException;
178203

179204
/**
180205
* Read a fixed size big decimal from input.
181206
*
182-
* @throws IOException in case of an I/O error
207+
* @return the big decimal read.
183208
*
184-
* @return the big decimal read
209+
* @throws IOException in case of an I/O error.
185210
*/
186211
BigDecimal readFixedBigDecimal() throws IOException;
187212

188213
/**
189214
* Read a string as UTF-8 encoded bytes from the input.
190215
*
191216
* @return the string.
217+
*
218+
* @throws IOException in case of an I/O error.
192219
*/
193220
String readUTF() throws IOException;
194221

195222
/**
196-
* Read the following count numeric values from the input
197-
* and drop them.
223+
* Skip over a number of numeric values from.
198224
*
199-
* @param count the number of bytes to skip
200-
* @throws IOException in case of an I/O error
225+
* @param count the number of numeric values to skip.
226+
*
227+
* @throws IOException in case of an I/O error.
201228
*/
202229
void skip(int count) throws IOException;
203230

231+
/**
232+
* Skip over a number of bytes.
233+
*
234+
* @param count the number of bytes to skip.
235+
*
236+
* @throws IOException in case of an I/O error.
237+
*/
204238
void skipBytes(long count) throws IOException;
205239

206240
/**
207241
* Copy the next numeric value from the input to the
208242
* specified output stream.
209243
*
210-
* @param output the output destination to copy the data to
211-
* @throws IOException in case of an I/O error
244+
* @param output the output destination to copy the data to.
245+
*
246+
* @throws IOException in case of an I/O error.
212247
*/
213248
void copyTo(VariableByteOutput output) throws IOException;
214249

215250
/**
216251
* Copy the count next numeric values from the input to
217252
* the specified output stream.
218253
*
219-
* @param os the output destination to copy the data to
220-
* @param count the number of bytes to copy
221-
* @throws IOException in case of an I/O error
254+
* @param os the output destination to copy the data to.
255+
* @param count the number of bytes to copy.
256+
*
257+
* @throws IOException in case of an I/O error.
222258
*/
223259
void copyTo(VariableByteOutput os, int count)
224260
throws IOException;
225-
261+
262+
/**
263+
* Copy bytes from the input to the specified output stream.
264+
*
265+
* @param os the output destination to copy the data to.
266+
* @param bytes the number of bytes to copy.
267+
*
268+
* @throws IOException in case of an I/O error.
269+
*/
226270
void copyRaw(VariableByteOutput os, int bytes)
227271
throws IOException;
228272
}

exist-core/src/main/java/org/exist/storage/io/VariableByteOutput.java

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,26 @@ public interface VariableByteOutput {
3535
* Write a byte to the output.
3636
*
3737
* @param b the byte to write.
38+
*
39+
* @throws IOException in case of an I/O error.
3840
*/
3941
void write(final int b) throws IOException;
4042

4143
/**
4244
* Write a byte to the output.
4345
*
4446
* @param b the byte to write.
47+
*
48+
* @throws IOException in case of an I/O error.
4549
*/
4650
void writeByte(final byte b) throws IOException;
4751

4852
/**
4953
* Write bytes to the output.
5054
*
5155
* @param buf the bytes to write.
56+
*
57+
* @throws IOException in case of an I/O error.
5258
*/
5359
void write(final byte[] buf) throws IOException;
5460

@@ -58,6 +64,8 @@ public interface VariableByteOutput {
5864
* @param buf the bytes to write.
5965
* @param off the offset to read the bytes from.
6066
* @param len the length of bytes to read.
67+
*
68+
* @throws IOException in case of an I/O error.
6169
*/
6270
void write(final byte[] buf, final int off, final int len) throws IOException;
6371

@@ -72,7 +80,9 @@ public interface VariableByteOutput {
7280
* 128 and 16383, 2 bytes
7381
* 16384 and {@link Short#MAX_VALUE}, 3 bytes
7482
*
75-
* @param s the short to write.
83+
* @param s the short to write.
84+
*
85+
* @throws IOException in case of an I/O error.
7686
*/
7787
void writeShort(int s) throws IOException;
7888

@@ -82,6 +92,8 @@ public interface VariableByteOutput {
8292
* Requires 2 bytes.
8393
*
8494
* @param s the short to write.
95+
*
96+
* @throws IOException in case of an I/O error.
8597
*/
8698
void writeFixedShort(final short s) throws IOException;
8799

@@ -98,7 +110,9 @@ public interface VariableByteOutput {
98110
* 2097152 and 268435455, is 4 bytes
99111
* 268435456 and {@link Integer#MAX_VALUE}, 5 bytes
100112
*
101-
* @param i the integer to write.
113+
* @param i the integer to write.
114+
*
115+
* @throws IOException in case of an I/O error.
102116
*/
103117
void writeInt(int i) throws IOException;
104118

@@ -108,6 +122,8 @@ public interface VariableByteOutput {
108122
* Requires 4 bytes.
109123
*
110124
* @param i the integer to write.
125+
*
126+
* @throws IOException in case of an I/O error.
111127
*/
112128
void writeFixedInt(final int i) throws IOException;
113129

@@ -130,6 +146,8 @@ public interface VariableByteOutput {
130146
* 9223372036854775808 and {@link Long#MAX_VALUE}, 10 bytes
131147
*
132148
* @param l the long to write.
149+
*
150+
* @throws IOException in case of an I/O error.
133151
*/
134152
void writeLong(long l) throws IOException;
135153

@@ -139,6 +157,8 @@ public interface VariableByteOutput {
139157
* Requires 8 bytes.
140158
*
141159
* @param l the long to write.
160+
*
161+
* @throws IOException in case of an I/O error.
142162
*/
143163
void writeFixedLong(final long l) throws IOException;
144164

@@ -149,7 +169,9 @@ public interface VariableByteOutput {
149169
* VBE int - data length
150170
* byte[] - data
151171
*
152-
* @param bi the big integer to write
172+
* @param bi the big integer to write.
173+
*
174+
* @throws IOException in case of an I/O error.
153175
*/
154176
void writeBigInteger(final BigInteger bi) throws IOException;
155177

@@ -160,7 +182,9 @@ public interface VariableByteOutput {
160182
* int - data length
161183
* byte[] - data
162184
*
163-
* @param bi the big integer to write
185+
* @param bi the big integer to write.
186+
*
187+
* @throws IOException in case of an I/O error.
164188
*/
165189
void writeFixedBigInteger(final BigInteger bi) throws IOException;
166190

@@ -174,6 +198,8 @@ public interface VariableByteOutput {
174198
* byte[] - data
175199
*
176200
* @param bd the big decimal to write.
201+
*
202+
* @throws IOException in case of an I/O error.
177203
*/
178204
void writeBigDecimal(final BigDecimal bd) throws IOException;
179205

@@ -187,13 +213,17 @@ public interface VariableByteOutput {
187213
* byte[] - data
188214
*
189215
* @param bd the big decimal to write.
216+
*
217+
* @throws IOException in case of an I/O error.
190218
*/
191219
void writeFixedBigDecimal(final BigDecimal bd) throws IOException;
192220

193221
/**
194222
* Write a string as UTF-8 encoded bytes to the output.
195223
*
196224
* @param s the string to write.
225+
*
226+
* @throws IOException in case of an I/O error.
197227
*/
198228
void writeUTF(final String s) throws IOException;
199229
}

0 commit comments

Comments
 (0)