Author: sebb
Date: Tue Oct 9 22:15:04 2012
New Revision: 1396378
URL: http://svn.apache.org/viewvc?rev=1396378&view=rev
Log:
NET-485 Remove unnecessary Base64 methods
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/Base64.java
Modified: commons/proper/net/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1396378&r1=1396377&r2=1396378&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Oct 9 22:15:04 2012
@@ -64,8 +64,11 @@ The <action> type attribute can be add,u
<body>
<release version="3.2" date="TBA" description="
This release fixes bugs and adds some new functionality (see below).
- It is binary compatible with previous releases
+ It is binary compatible with previous releases.
">
+ <action issue="NET-485" dev="sebb" type="fix">
+ Remove unnecessary Base64 methods.
+ </action>
<action issue="NET-482" dev="sebb" type="update" due-to="Houman
Atashbar">
Support XOAUTH.
</action>
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/Base64.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/Base64.java?rev=1396378&r1=1396377&r2=1396378&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/Base64.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/Base64.java
Tue Oct 9 22:15:04 2012
@@ -721,26 +721,6 @@ public class Base64 {
}
/**
- * Decodes an Object using the base64 algorithm. This method is provided
in order to satisfy the requirements of the
- * Decoder interface, and will throw a DecoderException if the supplied
object is not of type byte[] or String.
- *
- * @param pObject
- * Object to decode
- * @return An object (of type byte[]) containing the binary data which
corresponds to the byte[] or String supplied.
- * @throws RuntimeException
- * if the parameter supplied is not of type byte[]
- */
- public Object decode(Object pObject) {
- if (pObject instanceof byte[]) {
- return decode((byte[]) pObject);
- } else if (pObject instanceof String) {
- return decode((String) pObject);
- } else {
- throw new RuntimeException("Parameter supplied to Base64 decode is
not a byte[] or a String");
- }
- }
-
- /**
* Decodes a String containing containing characters in the Base64
alphabet.
*
* @param pArray
@@ -899,25 +879,6 @@ public class Base64 {
}
}
- // Implementation of the Encoder Interface
-
- /**
- * Encodes an Object using the base64 algorithm. This method is provided
in order to satisfy the requirements of the
- * Encoder interface, and will throw an EncoderException if the supplied
object is not of type byte[].
- *
- * @param pObject
- * Object to encode
- * @return An object (of type byte[]) containing the base64 encoded data
which corresponds to the byte[] supplied.
- * @throws RuntimeException
- * if the parameter supplied is not of type byte[]
- */
- public Object encode(Object pObject) {
- if (!(pObject instanceof byte[])) {
- throw new RuntimeException("Parameter supplied to Base64 encode is
not a byte[]");
- }
- return encode((byte[]) pObject);
- }
-
/**
* Encodes a byte[] containing binary data, into a String containing
characters in the Base64 alphabet.
*