aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-02-20 12:03:32 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-02-20 12:04:54 +0100
commitab7a38ff2956d427b598704e9309912593ff1d87 (patch)
tree91e1151e07aaddd404c756fd13a7782c05783e49 /pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java
parent6f6a16cdd2a49f7b50e8b0d2b75ef768a323eee7 (diff)
downloadpdf-as-4-ab7a38ff2956d427b598704e9309912593ff1d87.tar.gz
pdf-as-4-ab7a38ff2956d427b598704e9309912593ff1d87.tar.bz2
pdf-as-4-ab7a38ff2956d427b598704e9309912593ff1d87.zip
Added license text
Diffstat (limited to 'pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java')
-rw-r--r--pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java221
1 files changed, 122 insertions, 99 deletions
diff --git a/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java b/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java
index 5163822d..9c0b6b09 100644
--- a/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java
+++ b/pdf-as-legacy/src/main/java/at/gv/egiz/pdfas/api/io/DataSink.java
@@ -1,99 +1,122 @@
-/**
- * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
- * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
- * joint initiative of the Federal Chancellery Austria and Graz University of
- * Technology.
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://www.osor.eu/eupl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- *
- * This product combines work with different licenses. See the "NOTICE" text
- * file for details on the various modules and licenses.
- * The "NOTICE" text file is part of the distribution. Any derivative works
- * that you distribute must include a readable copy of the "NOTICE" text file.
- */
-package at.gv.egiz.pdfas.api.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Output document data sink.
- *
- * <p>
- * Actually, the DataSink can be seen as a factory for creating OutputStreams
- * with mime type and character encoding provided. This allows the API user to
- * decide how data is to be stored (e.g. in a file, in a byte array, etc.).
- * </p>
- *
- * @author wprinz
- */
-@Deprecated
-public interface DataSink
-{
- /**
- * Creates an OutputStream for binary data.
- *
- * <p>
- * Note that the stream may be written only once. Creating another stream
- * overwrites the existing one.
- * </p>
- *
- * @param mimeType
- * The mime type of the output data.
- * @return Returns the created output stream.
- * @throws IOException
- * Thrown if the stream cannot be created.
- */
- public OutputStream createOutputStream(String mimeType) throws IOException;
-
- /**
- * Creates an OutputStream for character data.
- *
- * <p>
- * This is basically the same as {@link #createOutputStream(String)}, but
- * allows to specify the character encoding.
- * </p>
- *
- * @param mimeType
- * The mime type of the output data.
- * @param characterEncoding
- * The character encoding of the data.
- * @return Returns the created output stream.
- * @throws IOException
- * Thrown if the stream cannot be created.
- */
- public OutputStream createOutputStream(String mimeType, String characterEncoding) throws IOException;
-
- /**
- * Returns the mime type of the data stream.
- *
- * <p>
- * This is only valid after a stream has been created.
- * </p>
- *
- * @return Returns the mime type of the data stream.
- */
- public String getMimeType();
-
- /**
- * Returns the character encoding of the data stream.
- *
- * <p>
- * This is only valid after a stream has been created. Null means that no
- * character encoding was specified for the data (e.g. if the data is binary).
- * </p>
- *
- * @return Returns the character encoding of the data stream.
- */
- public String getCharacterEncoding();
-}
+/*******************************************************************************
+ * <copyright> Copyright 2014 by E-Government Innovation Center EGIZ, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ ******************************************************************************/
+/**
+ * <copyright> Copyright 2006 by Know-Center, Graz, Austria </copyright>
+ * PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
+ * joint initiative of the Federal Chancellery Austria and Graz University of
+ * Technology.
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://www.osor.eu/eupl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ *
+ * This product combines work with different licenses. See the "NOTICE" text
+ * file for details on the various modules and licenses.
+ * The "NOTICE" text file is part of the distribution. Any derivative works
+ * that you distribute must include a readable copy of the "NOTICE" text file.
+ */
+package at.gv.egiz.pdfas.api.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * Output document data sink.
+ *
+ * <p>
+ * Actually, the DataSink can be seen as a factory for creating OutputStreams
+ * with mime type and character encoding provided. This allows the API user to
+ * decide how data is to be stored (e.g. in a file, in a byte array, etc.).
+ * </p>
+ *
+ * @author wprinz
+ */
+@Deprecated
+public interface DataSink
+{
+ /**
+ * Creates an OutputStream for binary data.
+ *
+ * <p>
+ * Note that the stream may be written only once. Creating another stream
+ * overwrites the existing one.
+ * </p>
+ *
+ * @param mimeType
+ * The mime type of the output data.
+ * @return Returns the created output stream.
+ * @throws IOException
+ * Thrown if the stream cannot be created.
+ */
+ public OutputStream createOutputStream(String mimeType) throws IOException;
+
+ /**
+ * Creates an OutputStream for character data.
+ *
+ * <p>
+ * This is basically the same as {@link #createOutputStream(String)}, but
+ * allows to specify the character encoding.
+ * </p>
+ *
+ * @param mimeType
+ * The mime type of the output data.
+ * @param characterEncoding
+ * The character encoding of the data.
+ * @return Returns the created output stream.
+ * @throws IOException
+ * Thrown if the stream cannot be created.
+ */
+ public OutputStream createOutputStream(String mimeType, String characterEncoding) throws IOException;
+
+ /**
+ * Returns the mime type of the data stream.
+ *
+ * <p>
+ * This is only valid after a stream has been created.
+ * </p>
+ *
+ * @return Returns the mime type of the data stream.
+ */
+ public String getMimeType();
+
+ /**
+ * Returns the character encoding of the data stream.
+ *
+ * <p>
+ * This is only valid after a stream has been created. Null means that no
+ * character encoding was specified for the data (e.g. if the data is binary).
+ * </p>
+ *
+ * @return Returns the character encoding of the data stream.
+ */
+ public String getCharacterEncoding();
+}