Skip to content

Commit

Permalink
Fixing minor style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelmay committed Sep 15, 2024
1 parent aea7da8 commit 3b255a6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
16 changes: 8 additions & 8 deletions core/src/main/java/de/m3y/mobi/core/MobiHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
* final MobiHeader header = MobiHeader.read(is);
* </code>
* <p/>
* For more info about MOBI, see http://wiki.mobileread.com/wiki/MOBI
* For more info about MOBI, see <a href="http://wiki.mobileread.com/wiki/MOBI">http://wiki.mobileread.com/wiki/MOBI</a>
*/
public class MobiHeader {

/**
* Reads MOBI EXTH.
* <p/>
* See http://wiki.mobileread.com/wiki/MOBI#EXTH_Header
* See <a href="http://wiki.mobileread.com/wiki/MOBI#EXTH_Header">"http://wiki.mobileread.com/wiki/MOBI#EXTH_Header</a>
*/
public static class Exth {
/**
Expand Down Expand Up @@ -69,8 +69,8 @@ public String toString() {
/**
* Helper for dealing with EXTH Header types.
* <p/>
* See http://wiki.mobileread.com/wiki/MOBI#EXTH_Header
* and https://github.com/dougmassay/kindleunpack-calibre-plugin/blob/master/core_subtree/lib/mobi_header.py
* See <a href="http://wiki.mobileread.com/wiki/MOBI#EXTH_Header">http://wiki.mobileread.com/wiki/MOBI#EXTH_Header</a>
* and <a href="https://github.com/dougmassay/kindleunpack-calibre-plugin/blob/master/core_subtree/lib/mobi_header.py">https://github.com/dougmassay/kindleunpack-calibre-plugin/blob/master/core_subtree/lib/mobi_header.py</a>
*/
public static class RecordType {
public static final int DRM_SERVER_ID = 1;
Expand Down Expand Up @@ -108,9 +108,9 @@ public static class RecordType {
public static final int KF8_COVER_URI = 129;
public static final int REGION_MAGNIFICATION = 132;
public static final int DICT_SHORT_NAME = 200;
public static final int COVER_OFFSET = 201; // Add to first image field in Mobi Header to find
public static final int COVER_OFFSET = 201; // Add to the first image field in Mobi Header to find
// PDB record containing the cover image
public static final int THUMB_OFFSET = 202; // Add to first image field in Mobi Header to find
public static final int THUMB_OFFSET = 202; // Add to the first image field in Mobi Header to find
// PDB record containing the thumbnail cover image
public static final int HAS_FAKE_COVER = 203;
public static final int CREATOR_SOFTWARE_RECORDS = 204; // 204-207 are usually the same for all books
Expand All @@ -119,7 +119,7 @@ public static class RecordType {
public static final int CREATOR_MINOR_VERSION = 206;
public static final int CREATOR_BUILD_NUMBER = 207;
public static final int WATERMARK = 208;
public static final int TAMPER_PROOF_KEYS = 209; // Used by the Kindle = and Android app) for
public static final int TAMPER_PROOF_KEYS = 209; // Used by the Kindle and Android app for
// generating book-specific PIDs.
public static final int FONT_SIGNATURE = 300;
public static final int CLIPPING_LIMIT = 401;
Expand Down Expand Up @@ -348,7 +348,7 @@ public static Header read(DataInputStream is, Charset encoding) throws IOExcepti
/**
* Gets an EXTH records by record type code.
*
* @param recordTypeCode the record type code, eg 104 for ISBN.
* @param recordTypeCode the record type code, e.g., 104 for ISBN.
* @return the record or null if not available.
*/
public Record getRecordByTypeCode(int recordTypeCode) {
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/de/m3y/mobi/core/PalmDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Palm database (PDB) contains one header and zero to many records.
* <p/>
* http://wiki.mobileread.com/wiki/PDB
* <a href="http://wiki.mobileread.com/wiki/PDB">http://wiki.mobileread.com/wiki/PDB</a>
*/
public class PalmDatabase {
/**
Expand Down Expand Up @@ -74,9 +74,9 @@ public static class Header {
* @param is the input stream.
* @return the representing header.
* @throws IOException on error.
* <p>
* See https://wiki.mobileread.com/wiki/PDB#Palm_Database_Format and
* https://wiki.mobileread.com/wiki/MOBI
* <p>
* See <a href="https://wiki.mobileread.com/wiki/PDB#Palm_Database_Format">https://wiki.mobileread.com/wiki/PDB#Palm_Database_Format</a> and
* <a href="https://wiki.mobileread.com/wiki/MOBI">https://wiki.mobileread.com/wiki/MOBI</a>
*/
public static Header read(DataInputStream is) throws IOException {
Header header = new Header();
Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version='1.0'?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>libmobi</name>
<url>https://github.com/marcelmay/lib-mobi</url>
Expand All @@ -15,7 +16,7 @@
<licenses>
<license>
<name>Apache 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -164,7 +165,7 @@
<version>3.9</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.8</version>
<version>1.8</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down
4 changes: 3 additions & 1 deletion standalone/src/main/java/de/m3y/mobi/standalone/Runner.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package de.m3y.mobi.standalone;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.json.JsonWriteFeature;
Expand All @@ -25,7 +27,7 @@ public static void main(String[] args) throws IOException {
}

try (final DataInputStream is = new DataInputStream(new BufferedInputStream(
new FileInputStream(filename)))) {
Files.newInputStream(Paths.get(filename))))) {
ObjectMapper mapper = new ObjectMapper()
.enable(SerializationFeature.INDENT_OUTPUT)
.enable(SerializationFeature.WRAP_ROOT_VALUE)
Expand Down

0 comments on commit 3b255a6

Please sign in to comment.