Skip to content

Commit 54521d6

Browse files
committed
scope down
1 parent ec4c28d commit 54521d6

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/nl/melp/redis/Redis.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
import java.util.List;
88

99
/**
10-
* A lightweight implementation of the nl.melp.redis.Redis server protocol.
10+
* A lightweight implementation of the Redis server protocol.
1111
*
12-
* Effectively a complete nl.melp.redis.Redis client implementation.
12+
* Effectively a complete Redis client implementation.
1313
*/
1414
public class Redis {
15-
public static class Encoder {
15+
static class Encoder {
1616
private static byte[] CRLF = new byte[]{'\r', '\n'};
1717
private final OutputStream out;
1818

19-
public Encoder(OutputStream out) {
19+
Encoder(OutputStream out) {
2020
this.out = out;
2121
}
2222

23-
public void write(String s) throws IOException {
23+
void write(String s) throws IOException {
2424
byte[] value = s.getBytes();
2525
out.write('$');
2626
out.write(Long.toString(value.length).getBytes());
@@ -29,13 +29,13 @@ public void write(String s) throws IOException {
2929
out.write(CRLF);
3030
}
3131

32-
public void write(long v) throws IOException {
32+
void write(long v) throws IOException {
3333
out.write(':');
3434
out.write(Long.toString(v).getBytes());
3535
out.write(CRLF);
3636
}
3737

38-
public void write(List<Object> list) throws IOException {
38+
void write(List<Object> list) throws IOException {
3939
out.write('*');
4040
out.write(Long.toString(list.size()).getBytes());
4141
out.write(CRLF);
@@ -57,26 +57,26 @@ public void write(List<Object> list) throws IOException {
5757
}
5858
}
5959

60-
public static class Parser {
61-
public static class ParseException extends RuntimeException {
62-
public ParseException(String msg) {
60+
static class Parser {
61+
static class ParseException extends RuntimeException {
62+
ParseException(String msg) {
6363
super(msg);
6464
}
6565
}
6666

67-
public static class ServerError extends RuntimeException {
67+
static class ServerError extends RuntimeException {
6868
public ServerError(String msg) {
6969
super(msg);
7070
}
7171
}
7272

7373
private final InputStream input;
7474

75-
public Parser(InputStream input) {
75+
Parser(InputStream input) {
7676
this.input = input;
7777
}
7878

79-
public Object parse() throws IOException {
79+
Object parse() throws IOException {
8080
Object ret;
8181
switch (this.input.read()) {
8282
case '+':

0 commit comments

Comments
 (0)