Skip to content

Commit f0ca20c

Browse files
committed
Cleanup improper JavaDoc formatting in a number of places.
1 parent 034a842 commit f0ca20c

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

src/main/java/software/coley/llzip/part/CentralDirectoryFileHeader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public void setCrc32(int crc32) {
207207
* Different zip-parsing programs treat the files differently
208208
* and may not adhere to what you expect from the zip specification.
209209
* <br>
210-
* When in doubt, trust {@link byte[]#length()} from {@link LocalFileHeader#getFileData()}.
210+
* When in doubt, trust {@code data.length()} from {@link LocalFileHeader#getFileData()}.
211211
*
212212
* @return Compressed size of {@link LocalFileHeader#getFileData()}.
213213
*/
@@ -288,15 +288,15 @@ public void setFileCommentLength(int fileCommentLength) {
288288
}
289289

290290
/**
291-
* @return Disk number where the archive starts from, or {@link 0xFFFF} for ZIP64.
291+
* @return Disk number where the archive starts from, or {@code 0xFFFF} for ZIP64.
292292
*/
293293
public int getDiskNumberStart() {
294294
return diskNumberStart;
295295
}
296296

297297
/**
298298
* @param diskNumberStart
299-
* Disk number where the archive starts from, or {@link 0xFFFF} for ZIP64.
299+
* Disk number where the archive starts from, or {@code 0xFFFF} for ZIP64.
300300
*/
301301
public void setDiskNumberStart(int diskNumberStart) {
302302
this.diskNumberStart = diskNumberStart;

src/main/java/software/coley/llzip/part/LocalFileHeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public void setCrc32(int crc32) {
194194
* Different zip-parsing programs treat the files differently
195195
* and may not adhere to what you expect from the zip specification.
196196
* <br>
197-
* When in doubt, trust {@link byte[]#length()} from {@link #getFileData()}.
197+
* When in doubt, trust {@code data.length()} from {@link #getFileData()}.
198198
*
199199
* @return Compressed size of {@link #getFileData()}.
200200
*/

src/main/java/software/coley/llzip/util/ByteData.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,27 @@ public interface ByteData extends Closeable {
4545
*
4646
* @param position
4747
* Position to copy from.
48+
* @param buffer
49+
* Buffer to store contents in.
50+
* @param off
51+
* Offset in buffer to start from.
52+
* @param len
53+
* Length of content.
4854
*/
49-
void get(long position, byte[] b, int off, int len);
55+
void get(long position, byte[] buffer, int off, int len);
5056

5157
/**
5258
* Transfers data to target output stream.
5359
*
5460
* @param out
5561
* Stream to transfer data to.
56-
* @param buf
62+
* @param buffer
5763
* Buffer to use for transferring.
5864
*
5965
* @throws IOException
6066
* If any I/O error occurs.
6167
*/
62-
void transferTo(OutputStream out, byte[] buf) throws IOException;
68+
void transferTo(OutputStream out, byte[] buffer) throws IOException;
6369

6470
/**
6571
* Makes a slice of data.

src/main/java/software/coley/llzip/util/UnsafeMappedFile.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,26 @@ public byte get(long position) {
5555
}
5656

5757
@Override
58-
public void get(long position, byte[] b, int off, int len) {
58+
public void get(long position, byte[] buffer, int off, int len) {
5959
ensureOpen();
6060
long address = validate(position);
6161
if (address + len > end)
6262
throw new IllegalArgumentException();
63-
UNSAFE.copyMemory(null, address, b, Unsafe.ARRAY_BYTE_BASE_OFFSET + off, len);
63+
UNSAFE.copyMemory(null, address, buffer, Unsafe.ARRAY_BYTE_BASE_OFFSET + off, len);
6464
}
6565

6666
@Override
67-
public void transferTo(OutputStream out, byte[] buf) throws IOException {
67+
public void transferTo(OutputStream out, byte[] buffer) throws IOException {
6868
ensureOpen();
69-
int copyThreshold = buf.length;
69+
int copyThreshold = buffer.length;
7070
long address = this.address;
7171
long remaining = end - address;
7272
while (remaining != 0L) {
7373
int length = (int) Math.min(copyThreshold, remaining);
74-
UNSAFE.copyMemory(null, address, buf, Unsafe.ARRAY_BYTE_BASE_OFFSET, length);
74+
UNSAFE.copyMemory(null, address, buffer, Unsafe.ARRAY_BYTE_BASE_OFFSET, length);
7575
remaining -= length;
7676
address += length;
77-
out.write(buf, 0, length);
77+
out.write(buffer, 0, length);
7878
}
7979
}
8080

0 commit comments

Comments
 (0)