diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-11-29 11:17:09 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-11-29 11:17:09 +0100 |
commit | 023b0901731c61d9beab042df564b7f89697ecff (patch) | |
tree | fe526f5d0a9098d1124097e823a339771bf9e1b1 /pdf-as-lib/src/main/java/at | |
parent | df821b942610b44e12f2d44627eb9b4f34a03b02 (diff) | |
download | pdf-as-3-023b0901731c61d9beab042df564b7f89697ecff.tar.gz pdf-as-3-023b0901731c61d9beab042df564b7f89697ecff.tar.bz2 pdf-as-3-023b0901731c61d9beab042df564b7f89697ecff.zip |
Fixed Multithreading Bug Coding Helper
Diffstat (limited to 'pdf-as-lib/src/main/java/at')
-rw-r--r-- | pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java | 7 |
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");
}
|