summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2023-10-28 08:57:42 +0200
committerMichael Peter Christen <mc@yacy.net>2023-10-28 08:57:42 +0200
commitad8ee3a0b6d1a12dfa68f060fd6def044e3f59cd (patch)
tree7418fa9d99fbeec2d9b1c255f8f3e868b7754555
parentc4082c4ff217c461b913b4bcd424cd14a7c4a831 (diff)
fixed typo in class name
-rw-r--r--source/org/openzim/RandomAccessFileZIMInputStream.java (renamed from source/org/openzim/RandomAcessFileZIMInputStream.java)4
-rw-r--r--source/org/openzim/ZIMFile.java4
-rw-r--r--source/org/openzim/ZIMReader.java16
3 files changed, 12 insertions, 12 deletions
diff --git a/source/org/openzim/RandomAcessFileZIMInputStream.java b/source/org/openzim/RandomAccessFileZIMInputStream.java
index 7f34b7411..4d81768c8 100644
--- a/source/org/openzim/RandomAcessFileZIMInputStream.java
+++ b/source/org/openzim/RandomAccessFileZIMInputStream.java
@@ -33,7 +33,7 @@ import java.io.RandomAccessFile;
* moved conditions for exceptions to asserts,
* refactoring and merge with Utilities
*/
-public class RandomAcessFileZIMInputStream extends InputStream {
+public class RandomAccessFileZIMInputStream extends InputStream {
private final RandomAccessFile mRAFReader;
private long mMarked = -1;
@@ -41,7 +41,7 @@ public class RandomAcessFileZIMInputStream extends InputStream {
private final byte[] buffer4 = new byte[4];
private final byte[] buffer8 = new byte[8];
- public RandomAcessFileZIMInputStream(final RandomAccessFile reader) {
+ public RandomAccessFileZIMInputStream(final RandomAccessFile reader) {
this.mRAFReader = reader;
}
diff --git a/source/org/openzim/ZIMFile.java b/source/org/openzim/ZIMFile.java
index e712326dc..24d9ace65 100644
--- a/source/org/openzim/ZIMFile.java
+++ b/source/org/openzim/ZIMFile.java
@@ -67,13 +67,13 @@ public class ZIMFile extends File {
}
// The reader that will be used to read contents from the file
- final RandomAcessFileZIMInputStream reader = new RandomAcessFileZIMInputStream(new RandomAccessFile(this, "r"));
+ final RandomAccessFileZIMInputStream reader = new RandomAccessFileZIMInputStream(new RandomAccessFile(this, "r"));
// Read the contents of the header
this.header_magicNumber = reader.readFourLittleEndianBytesInt(); // 4
this.header_majorVersion = reader.readTwoLittleEndianBytesInt(); // 2
this.header_minorVersion = reader.readTwoLittleEndianBytesInt(); // 4
- RandomAcessFileZIMInputStream.skipFully(reader, 16); // skip the uuid, this is not used
+ RandomAccessFileZIMInputStream.skipFully(reader, 16); // skip the uuid, this is not used
this.header_entryCount = reader.readFourLittleEndianBytesInt(); // 4
this.header_clusterCount = reader.readFourLittleEndianBytesInt(); // 4
this.header_urlPtrPos = reader.readEightLittleEndianBytesLong(); // 8
diff --git a/source/org/openzim/ZIMReader.java b/source/org/openzim/ZIMReader.java
index baaf784bf..4cecccacd 100644
--- a/source/org/openzim/ZIMReader.java
+++ b/source/org/openzim/ZIMReader.java
@@ -41,7 +41,7 @@ import org.tukaani.xz.SingleXZInputStream;
public class ZIMReader {
private final ZIMFile mFile;
- private RandomAcessFileZIMInputStream mReader;
+ private RandomAccessFileZIMInputStream mReader;
public static abstract class DirectoryEntry {
@@ -100,7 +100,7 @@ public class ZIMReader {
public ZIMReader(final ZIMFile file) {
this.mFile = file;
try {
- this.mReader = new RandomAcessFileZIMInputStream(new RandomAccessFile(this.mFile, "r"));
+ this.mReader = new RandomAccessFileZIMInputStream(new RandomAccessFile(this.mFile, "r"));
} catch (final FileNotFoundException e) {
e.printStackTrace();
}
@@ -321,14 +321,14 @@ public class ZIMReader {
offset1 = firstOffset;
} else {
location = (article.blob_number - 1) * 4;
- RandomAcessFileZIMInputStream.skipFully(this.mReader, location);
+ RandomAccessFileZIMInputStream.skipFully(this.mReader, location);
offset1 = this.mReader.readFourLittleEndianBytesInt();
}
offset2 = this.mReader.readFourLittleEndianBytesInt();
differenceOffset = offset2 - offset1;
byte[] entry = new byte[differenceOffset];
- RandomAcessFileZIMInputStream.skipFully(this.mReader, (offset1 - 4 * (article.blob_number + 2)));
+ RandomAccessFileZIMInputStream.skipFully(this.mReader, (offset1 - 4 * (article.blob_number + 2)));
this.mReader.read(entry, 0, differenceOffset);
return entry;
@@ -357,16 +357,16 @@ public class ZIMReader {
offset1 = firstOffset;
} else {
location = (article.blob_number - 1) * 4;
- RandomAcessFileZIMInputStream.skipFully(xzReader, location);
+ RandomAccessFileZIMInputStream.skipFully(xzReader, location);
xzReader.read(buffer);
- offset1 = RandomAcessFileZIMInputStream.toFourLittleEndianInteger(buffer);
+ offset1 = RandomAccessFileZIMInputStream.toFourLittleEndianInteger(buffer);
}
xzReader.read(buffer);
- offset2 = RandomAcessFileZIMInputStream.toFourLittleEndianInteger(buffer);
+ offset2 = RandomAccessFileZIMInputStream.toFourLittleEndianInteger(buffer);
differenceOffset = offset2 - offset1;
byte[] entry = new byte[differenceOffset];
- RandomAcessFileZIMInputStream.skipFully(xzReader, (offset1 - 4 * (article.blob_number + 2)));
+ RandomAccessFileZIMInputStream.skipFully(xzReader, (offset1 - 4 * (article.blob_number + 2)));
xzReader.read(entry, 0, differenceOffset);
return entry;