Skip to content

Commit 7817bfd

Browse files
committed
Tab police
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744726 13f79535-47bb-0310-9956-ffa450edef68
1 parent c0fdc94 commit 7817bfd

5 files changed

Lines changed: 1297 additions & 1297 deletions

File tree

build.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ limitations under the License.
5656
<javac srcdir="${source.home}" destdir="${build.home}/classes"
5757
source="${compile.source}" target="${compile.target}"
5858
debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"
59-
includeantruntime="${compile.includeantruntime}"
60-
encoding="${compile.encoding}">
59+
includeantruntime="${compile.includeantruntime}"
60+
encoding="${compile.encoding}">
6161
<classpath refid="compile.classpath"/>
6262
</javac>
6363
<copy todir="${build.home}/classes" filtering="on">
@@ -91,7 +91,7 @@ limitations under the License.
9191
bottom="${component.name} version ${component.version} - Copyright &amp;copy; 2002-${current.year} - Apache Software Foundation"
9292
use="true"
9393
link="http://download.oracle.com/javase/1.5.0/docs/api/"
94-
encoding="${compile.encoding}">
94+
encoding="${compile.encoding}">
9595
<classpath refid="compile.classpath"/>
9696
</javadoc>
9797
</target>
@@ -192,8 +192,8 @@ limitations under the License.
192192
<javac srcdir="${test.home}" destdir="${build.home}/tests"
193193
source="${compile.source}" target="${compile.target}"
194194
debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"
195-
includeantruntime="${compile.includeantruntime}"
196-
encoding="${compile.encoding}">
195+
includeantruntime="${compile.includeantruntime}"
196+
encoding="${compile.encoding}">
197197
<classpath refid="test.classpath"/>
198198
</javac>
199199
<copy todir="${build.home}/tests" filtering="on">

src/main/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -429,19 +429,19 @@ public byte[] encode(final byte[] pArray) {
429429
return encode(pArray, 0, pArray.length);
430430
}
431431

432-
/**
433-
* Encodes a byte[] containing binary data, into a byte[] containing
434-
* characters in the alphabet.
435-
*
436-
* @param pArray
437-
* a byte array containing binary data
438-
* @param offset
439-
* initial offset of the subarray.
440-
* @param length
441-
* length of the subarray.
442-
* @return A byte array containing only the base N alphabetic character data
443-
* @since 1.11
444-
*/
432+
/**
433+
* Encodes a byte[] containing binary data, into a byte[] containing
434+
* characters in the alphabet.
435+
*
436+
* @param pArray
437+
* a byte array containing binary data
438+
* @param offset
439+
* initial offset of the subarray.
440+
* @param length
441+
* length of the subarray.
442+
* @return A byte array containing only the base N alphabetic character data
443+
* @since 1.11
444+
*/
445445
public byte[] encode(final byte[] pArray, int offset, int length) {
446446
if (pArray == null || pArray.length == 0) {
447447
return pArray;

src/test/java/org/apache/commons/codec/binary/Base32Test.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,30 +75,30 @@ public class Base32Test {
7575
{"foobar" ,"MZXW6YTBOI%%%%%%"},
7676
};
7777

78-
@Test
79-
public void testBase64AtBufferStart() {
80-
testBase64InBuffer(0, 100);
81-
}
82-
83-
@Test
84-
public void testBase64AtBufferEnd() {
85-
testBase64InBuffer(100, 0);
86-
}
87-
88-
@Test
89-
public void testBase64AtBufferMiddle() {
90-
testBase64InBuffer(100, 100);
91-
}
92-
93-
private void testBase64InBuffer(int startPasSize, int endPadSize) {
94-
final Base32 codec = new Base32();
95-
for (final String[] element : BASE32_TEST_CASES) {
96-
final byte[] bytes = element[0].getBytes(CHARSET_UTF8);
97-
byte[] buffer = ArrayUtils.addAll(bytes, new byte[endPadSize]);
98-
buffer = ArrayUtils.addAll(new byte[startPasSize], buffer);
99-
assertEquals(element[1], StringUtils.newStringUtf8(codec.encode(buffer, startPasSize, bytes.length)));
100-
}
101-
}
78+
@Test
79+
public void testBase64AtBufferStart() {
80+
testBase64InBuffer(0, 100);
81+
}
82+
83+
@Test
84+
public void testBase64AtBufferEnd() {
85+
testBase64InBuffer(100, 0);
86+
}
87+
88+
@Test
89+
public void testBase64AtBufferMiddle() {
90+
testBase64InBuffer(100, 100);
91+
}
92+
93+
private void testBase64InBuffer(int startPasSize, int endPadSize) {
94+
final Base32 codec = new Base32();
95+
for (final String[] element : BASE32_TEST_CASES) {
96+
final byte[] bytes = element[0].getBytes(CHARSET_UTF8);
97+
byte[] buffer = ArrayUtils.addAll(bytes, new byte[endPadSize]);
98+
buffer = ArrayUtils.addAll(new byte[startPasSize], buffer);
99+
assertEquals(element[1], StringUtils.newStringUtf8(codec.encode(buffer, startPasSize, bytes.length)));
100+
}
101+
}
102102

103103
@Test
104104
public void testBase32Chunked () throws Exception {

0 commit comments

Comments
 (0)