aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-25 18:34:05 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-25 18:34:05 +0000
commit382636ee6b35783d5d1885b5bb84f87d7b518c02 (patch)
tree974ddd37fb2a9c0f6895e19f2c809fe13b6afd84 /src/java/org/apache/fop/afp/AFPDataObjectInfo.java
parent1c077ccadfd59e9429529ad92e2a3cf783e3a501 (diff)
downloadxmlgraphics-fop-382636ee6b35783d5d1885b5bb84f87d7b518c02.tar.gz
xmlgraphics-fop-382636ee6b35783d5d1885b5bb84f87d7b518c02.zip
* Reverted back the interface changes I made to ImageHandler.
* Created AbstractAFPImageHandlerRawStream base class to handle raw image streams for AFP. * Fixed a bug in handling native embedded TIFF images. I think its finally ready to roll now guys, sorry for the last minute glitches. My apologies for not finding time to respond to the fop-dev mailing list this afternoon but have been trying to put my efforts into applying the final touches to the branch. If my good lady allows I'll respond to your comments later this evening :). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@720561 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp/AFPDataObjectInfo.java')
-rw-r--r--src/java/org/apache/fop/afp/AFPDataObjectInfo.java87
1 files changed, 64 insertions, 23 deletions
diff --git a/src/java/org/apache/fop/afp/AFPDataObjectInfo.java b/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
index c618a53fc..f6ff0046a 100644
--- a/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
+++ b/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
@@ -19,8 +19,6 @@
package org.apache.fop.afp;
-import java.io.InputStream;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.fop.afp.modca.Registry;
@@ -43,12 +41,18 @@ public class AFPDataObjectInfo {
/** the data object height */
private int dataHeight;
- /** the object data in an inputstream */
- private InputStream inputStream;
-
/** the object registry mimetype */
private String mimeType;
+ /** the object data in a byte array */
+ private byte[] data;
+
+ /** the object data height resolution */
+ private int dataHeightRes;
+
+ /** the object data width resolution */
+ private int dataWidthRes;
+
/**
* Default constructor
*/
@@ -121,16 +125,6 @@ public class AFPDataObjectInfo {
return this.objectAreaInfo;
}
- /** {@inheritDoc} */
- public String toString() {
- return "AFPDataObjectInfo{"
- + "mimeType=" + mimeType
- + ", dataWidth=" + dataWidth
- + ", dataHeight=" + dataHeight
- + (objectAreaInfo != null ? ", objectAreaInfo=" + objectAreaInfo : "")
- + (resourceInfo != null ? ", resourceInfo=" + resourceInfo : "");
- }
-
/**
* Returns the uri of this data object
*
@@ -186,21 +180,68 @@ public class AFPDataObjectInfo {
}
/**
- * Sets the object data inputstream
+ * Returns the data height resolution
+ *
+ * @return the data height resolution
+ */
+ public int getDataHeightRes() {
+ return this.dataHeightRes;
+ }
+
+ /**
+ * Sets the data width resolution
+ *
+ * @param dataWidthRes the data width resolution
+ */
+ public void setDataHeightRes(int dataHeightRes) {
+ this.dataHeightRes = dataHeightRes;
+ }
+
+ /**
+ * Returns the data width resolution
+ *
+ * @return the data width resolution
+ */
+ public int getDataWidthRes() {
+ return this.dataWidthRes;
+ }
+
+ /**
+ * Sets the data width resolution
+ *
+ * @param dataWidthRes the data width resolution
+ */
+ public void setDataWidthRes(int dataWidthRes) {
+ this.dataWidthRes = dataWidthRes;
+ }
+
+ /**
+ * Sets the object data
*
- * @param inputStream the object data inputstream
+ * @param data the object data
*/
- public void setInputStream(InputStream inputStream) {
- this.inputStream = inputStream;
+ public void setData(byte[] data) {
+ this.data = data;
}
/**
- * Returns the object data inputstream
+ * Returns the object data
*
- * @return the object data inputstream
+ * @return the object data
*/
- public InputStream getInputStream() {
- return this.inputStream;
+ public byte[] getData() {
+ return this.data;
}
+ /** {@inheritDoc} */
+ public String toString() {
+ return "AFPDataObjectInfo{"
+ + "mimeType=" + mimeType
+ + ", dataWidth=" + dataWidth
+ + ", dataHeight=" + dataHeight
+ + ", dataWidthRes=" + dataWidthRes
+ + ", dataHeightRes=" + dataHeightRes
+ + (objectAreaInfo != null ? ", objectAreaInfo=" + objectAreaInfo : "")
+ + (resourceInfo != null ? ", resourceInfo=" + resourceInfo : "");
+ }
}