aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/impl
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 13:47:48 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 13:47:48 +0000
commit9b615852df5f56eeb67c4dd021a56e72d31a2498 (patch)
tree5cdf42cdb8dd552d73f7d4ef4299aa4743975d5e /src/main/java/at/gv/egiz/pdfas/impl
parent8ba10b6fa16c78ec3a8661d7b050320971495405 (diff)
downloadpdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.tar.gz
pdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.tar.bz2
pdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.zip
Error code created for protected pdf documents.
SettingsReader: Debug message for getInternalResource added (TRACE) multipart/formdata: align multipart charset with data charset added FIXME notes for FileHelper.readFromFile Signature/Verification-Demo updated git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@507 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/input/TextDataSourceImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/input/TextDataSourceImpl.java b/src/main/java/at/gv/egiz/pdfas/impl/input/TextDataSourceImpl.java
index c983a8a..077ed97 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/input/TextDataSourceImpl.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/input/TextDataSourceImpl.java
@@ -26,6 +26,8 @@ public class TextDataSourceImpl implements TextDataSource
* The text.
*/
protected String text = null;
+
+ private final static String CHARSET = "UTF-8";
/**
* Constructor that sets the text.
@@ -53,7 +55,7 @@ public class TextDataSourceImpl implements TextDataSource
{
try
{
- byte[] data = getText().getBytes("UTF-8");
+ byte[] data = getText().getBytes(CHARSET);
// PERF: if memory is an issue (e.g. in web), use a FileBased TextDataSource instead.
return new ByteArrayInputStream(data);
}
@@ -70,7 +72,7 @@ public class TextDataSourceImpl implements TextDataSource
{
try
{
- byte[] data = getText().getBytes("UTF-8");
+ byte[] data = getText().getBytes(CHARSET);
return data.length;
}
catch (UnsupportedEncodingException e)
@@ -86,7 +88,7 @@ public class TextDataSourceImpl implements TextDataSource
{
try
{
- byte[] data = getText().getBytes("UTF-8");
+ byte[] data = getText().getBytes(CHARSET);
return data;
}
catch (UnsupportedEncodingException e)