Skip to content

Commit a843800

Browse files
committed
Simplified package and class names
1 parent f458570 commit a843800

13 files changed

Lines changed: 48 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
CHANGELOG
22
=========
33

4+
0.3.0 (2013-10-XX)
5+
------------------
6+
7+
* IMPORTANT: The package name was changed to `com.maxmind.db`. The
8+
`MaxMindDbReader` class was renamed to `Reader`.
9+
* Improved error handling and test coverage.
10+
* Performance improvements.
11+
12+
413
0.2.0 (2013-07-08)
514
------------------
615

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To do this, add the dependency to your pom.xml:
1717

1818
```xml
1919
<dependency>
20-
<groupId>com.maxmind.maxminddb</groupId>
20+
<groupId>com.maxmind.db</groupId>
2121
<artifactId>maxminddb</artifactId>
2222
<version>0.2.0</version>
2323
</dependency>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<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/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.maxmind.maxminddb</groupId>
4+
<groupId>com.maxmind.db</groupId>
55
<artifactId>maxminddb</artifactId>
66
<version>0.2.1-SNAPSHOT</version>
77
<packaging>jar</packaging>

sample/Benchmark.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55

66
import com.fasterxml.jackson.databind.JsonNode;
77
import com.google.common.net.InetAddresses;
8-
import com.maxmind.maxminddb.InvalidDatabaseException;
9-
import com.maxmind.maxminddb.MaxMindDbReader;
10-
import com.maxmind.maxminddb.MaxMindDbReader.FileMode;
8+
import com.maxmind.db.InvalidDatabaseException;
9+
import com.maxmind.db.Reader;
10+
import com.maxmind.db.Reader.FileMode;
1111

1212
public class Benchmark {
1313

1414
public static void main(String[] args) throws IOException,
1515
InvalidDatabaseException {
1616
File file = new File("GeoLite2-City.mmdb");
1717

18-
MaxMindDbReader r = new MaxMindDbReader(file, FileMode.MEMORY_MAPPED);
18+
Reader r = new Reader(file, FileMode.MEMORY_MAPPED);
1919
Random random = new Random();
2020
int count = 1000000;
2121
long startTime = System.nanoTime();

src/main/java/com/maxmind/maxminddb/Decoder.java renamed to src/main/java/com/maxmind/db/Decoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.maxmind.maxminddb;
1+
package com.maxmind.db;
22

33
import java.io.IOException;
44
import java.math.BigInteger;

src/main/java/com/maxmind/maxminddb/InvalidDatabaseException.java renamed to src/main/java/com/maxmind/db/InvalidDatabaseException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.maxmind.maxminddb;
1+
package com.maxmind.db;
22

33
import java.io.IOException;
44

src/main/java/com/maxmind/maxminddb/Metadata.java renamed to src/main/java/com/maxmind/db/Metadata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.maxmind.maxminddb;
1+
package com.maxmind.db;
22

33
import java.math.BigInteger;
44

src/main/java/com/maxmind/maxminddb/MaxMindDbReader.java renamed to src/main/java/com/maxmind/db/Reader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.maxmind.maxminddb;
1+
package com.maxmind.db;
22

33
import java.io.Closeable;
44
import java.io.File;
@@ -12,7 +12,7 @@
1212
* Instances of this class provide a reader for the MaxMind DB format. IP
1313
* addresses can be looked up using the <code>get</code> method.
1414
*/
15-
public final class MaxMindDbReader implements Closeable {
15+
public final class Reader implements Closeable {
1616
private static final int DATA_SECTION_SEPARATOR_SIZE = 16;
1717
private static final byte[] METADATA_START_MARKER = { (byte) 0xAB,
1818
(byte) 0xCD, (byte) 0xEF, 'M', 'a', 'x', 'M', 'i', 'n', 'd', '.',
@@ -48,7 +48,7 @@ public enum FileMode {
4848
* @throws IOException
4949
* if there is an error opening or reading from the file.
5050
*/
51-
public MaxMindDbReader(File database) throws IOException {
51+
public Reader(File database) throws IOException {
5252
this(database, FileMode.MEMORY_MAPPED);
5353
}
5454

@@ -63,7 +63,7 @@ public MaxMindDbReader(File database) throws IOException {
6363
* @throws IOException
6464
* if there is an error opening or reading from the file.
6565
*/
66-
public MaxMindDbReader(File database, FileMode fileMode) throws IOException {
66+
public Reader(File database, FileMode fileMode) throws IOException {
6767
this.threadBuffer = new ThreadBuffer(database, fileMode);
6868
int start = this.findMetadataStart(database.getName());
6969

src/main/java/com/maxmind/maxminddb/ThreadBuffer.java renamed to src/main/java/com/maxmind/db/ThreadBuffer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.maxmind.maxminddb;
1+
package com.maxmind.db;
22

33
import java.io.Closeable;
44
import java.io.File;
@@ -8,7 +8,7 @@
88
import java.nio.channels.FileChannel;
99
import java.nio.channels.FileChannel.MapMode;
1010

11-
import com.maxmind.maxminddb.MaxMindDbReader.FileMode;
11+
import com.maxmind.db.Reader.FileMode;
1212

1313
final class ThreadBuffer extends ThreadLocal<ByteBuffer> implements Closeable {
1414
// DO NOT PASS THESE OUTSIDE THIS CLASS. Doing so will remove thread

src/main/java/com/maxmind/maxminddb/package-info.java renamed to src/main/java/com/maxmind/db/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* @author greg
66
*
77
*/
8-
package com.maxmind.maxminddb;
8+
package com.maxmind.db;

0 commit comments

Comments
 (0)