1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

SMACK-361 Some general code cleanup added some missing hashcode methods and added back some removed public API methods (marked as deprecated).

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13598 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
rcollier 2013-03-31 14:24:50 +00:00
parent 58f56ee31b
commit 0fdfd6e75e
12 changed files with 84 additions and 43 deletions

View file

@ -29,7 +29,7 @@ import java.io.IOException;
*/
public class Base32Encoder implements StringEncoder {
private static Base32Encoder instance;
private static Base32Encoder instance = new Base32Encoder();
private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678";
private Base32Encoder() {
@ -37,9 +37,6 @@ public class Base32Encoder implements StringEncoder {
}
public static Base32Encoder getInstance() {
if (instance == null) {
instance = new Base32Encoder();
}
return instance;
}

View file

@ -20,16 +20,13 @@ package org.jivesoftware.smack.util;
*/
public class Base64Encoder implements StringEncoder {
private static Base64Encoder instance;
private static Base64Encoder instance = new Base64Encoder();
private Base64Encoder() {
// Use getInstance()
}
public static Base64Encoder getInstance() {
if (instance == null) {
instance = new Base64Encoder();
}
return instance;
}

View file

@ -17,8 +17,6 @@
*/
package org.jivesoftware.smack.util;
// TODO move StringEncoder, Base64Encoder and Base32Encoder to smack.util
public interface StringEncoder {
/**
* Encodes an string to another representation
@ -26,7 +24,7 @@ public interface StringEncoder {
* @param string
* @return
*/
public String encode(String string);
String encode(String string);
/**
* Decodes an string back to it's initial representation
@ -34,5 +32,5 @@ public interface StringEncoder {
* @param string
* @return
*/
public String decode(String string);
String decode(String string);
}