Skip to content

Commit b396c53

Browse files
committed
Renamed basedCodec to baseNCodec.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1063833 13f79535-47bb-0310-9956-ffa450edef68
1 parent 59c42b1 commit b396c53

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ public class BaseNCodecInputStream extends FilterInputStream {
2626

2727
private final boolean doEncode;
2828

29-
private final BaseNCodec basedCodec;
29+
private final BaseNCodec baseNCodec;
3030

3131
private final byte[] singleByte = new byte[1];
3232

33-
protected BaseNCodecInputStream(InputStream in, BaseNCodec basedCodec, boolean doEncode) {
33+
protected BaseNCodecInputStream(InputStream in, BaseNCodec baseNCodec, boolean doEncode) {
3434
super(in);
3535
this.doEncode = doEncode;
36-
this.basedCodec = basedCodec;
36+
this.baseNCodec = baseNCodec;
3737
}
3838

3939
/**
@@ -101,16 +101,16 @@ public int read(byte b[], int offset, int len) throws IOException {
101101
This is a fix for CODEC-101
102102
*/
103103
while (readLen == 0) {
104-
if (!basedCodec.hasData()) {
104+
if (!baseNCodec.hasData()) {
105105
byte[] buf = new byte[doEncode ? 4096 : 8192];
106106
int c = in.read(buf);
107107
if (doEncode) {
108-
basedCodec.encode(buf, 0, c);
108+
baseNCodec.encode(buf, 0, c);
109109
} else {
110-
basedCodec.decode(buf, 0, c);
110+
baseNCodec.decode(buf, 0, c);
111111
}
112112
}
113-
readLen = basedCodec.readResults(b, offset, len);
113+
readLen = baseNCodec.readResults(b, offset, len);
114114
}
115115
return readLen;
116116
}

src/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public class BaseNCodecOutputStream extends FilterOutputStream {
2626

2727
private final boolean doEncode;
2828

29-
private final BaseNCodec basedCodec;
29+
private final BaseNCodec baseNCodec;
3030

3131
private final byte[] singleByte = new byte[1];
3232

3333
public BaseNCodecOutputStream(OutputStream out, BaseNCodec basedCodec, boolean doEncode) {
3434
super(out);
35-
this.basedCodec = basedCodec;
35+
this.baseNCodec = basedCodec;
3636
this.doEncode = doEncode;
3737
}
3838

@@ -76,9 +76,9 @@ public void write(byte b[], int offset, int len) throws IOException {
7676
throw new IndexOutOfBoundsException();
7777
} else if (len > 0) {
7878
if (doEncode) {
79-
basedCodec.encode(b, offset, len);
79+
baseNCodec.encode(b, offset, len);
8080
} else {
81-
basedCodec.decode(b, offset, len);
81+
baseNCodec.decode(b, offset, len);
8282
}
8383
flush(false);
8484
}
@@ -94,10 +94,10 @@ public void write(byte b[], int offset, int len) throws IOException {
9494
* if an I/O error occurs.
9595
*/
9696
private void flush(boolean propogate) throws IOException {
97-
int avail = basedCodec.avail();
97+
int avail = baseNCodec.avail();
9898
if (avail > 0) {
9999
byte[] buf = new byte[avail];
100-
int c = basedCodec.readResults(buf, 0, avail);
100+
int c = baseNCodec.readResults(buf, 0, avail);
101101
if (c > 0) {
102102
out.write(buf, 0, c);
103103
}
@@ -126,9 +126,9 @@ public void flush() throws IOException {
126126
public void close() throws IOException {
127127
// Notify encoder of EOF (-1).
128128
if (doEncode) {
129-
basedCodec.encode(singleByte, 0, -1);
129+
baseNCodec.encode(singleByte, 0, -1);
130130
} else {
131-
basedCodec.decode(singleByte, 0, -1);
131+
baseNCodec.decode(singleByte, 0, -1);
132132
}
133133
flush();
134134
out.close();

0 commit comments

Comments
 (0)