aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main')
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java
index 3546cd7..eebe127 100644
--- a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java
@@ -47,7 +47,7 @@ public class CodingHelper
/**
* Static Base64 object
*/
- private static Base64 b64 = new Base64();
+ //private static Base64 b64 = new Base64();
/**
* This method encodes a given Unicode (Java) String to UTF-8 bytes and then
@@ -61,6 +61,7 @@ public class CodingHelper
{
try
{
+ Base64 b64 = new Base64();
byte[] utf8_bytes = plain_string.getBytes("UTF-8");
byte[] base64_bytes = b64.encode(utf8_bytes);
String encoded_string = new String(base64_bytes, "US-ASCII");
@@ -84,6 +85,7 @@ public class CodingHelper
{
try
{
+ Base64 b64 = new Base64();
byte[] base64_bytes = encoded_string.getBytes("US-ASCII");
byte[] utf8_bytes = b64.decode(base64_bytes);
String plain_string = new String(utf8_bytes, "UTF-8");
@@ -157,6 +159,7 @@ public class CodingHelper
{
try
{
+ Base64 b64 = new Base64();
byte[] base64_bytes = theString.getBytes("US-ASCII");
return b64.decode(base64_bytes);
}
@@ -175,6 +178,7 @@ public class CodingHelper
*/
public static byte[] decodeBase64(byte[] ba)
{
+ Base64 b64 = new Base64();
return b64.decode(ba);
}
@@ -189,6 +193,7 @@ public class CodingHelper
{
try
{
+ Base64 b64 = new Base64();
byte[] base64_bytes = b64.encode(plainString);
return new String(base64_bytes, "US-ASCII");
}