Index: javax/print/Doc.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/print/Doc.java,v
retrieving revision 1.1
diff -u -r1.1 Doc.java
--- javax/print/Doc.java 26 Apr 2004 21:08:22 -0000 1.1
+++ javax/print/Doc.java 27 Apr 2004 11:57:17 -0000
@@ -38,8 +38,10 @@
package javax.print;
+import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
+
import javax.print.attribute.DocAttributeSet;
/**
@@ -66,22 +68,28 @@
* the document flavor.
*
* @return the print data
+ *
+ * @throws IOException if an error occurs
*/
- Object getPrintData();
+ Object getPrintData() throws IOException;
/**
* Returns a Reader
object for extracting character print data
* from this document.
*
* @return the Reader
object
+ *
+ * @throws IOException if an error occurs
*/
- Reader getReaderForText();
+ Reader getReaderForText() throws IOException;
/**
* Returns an InputStream
object for extracting byte print data
* from this document.
*
* @return the InputStream
object
+ *
+ * @throws IOException if an error occurs
*/
- InputStream getStreamForBytes();
+ InputStream getStreamForBytes() throws IOException;
}
Index: javax/print/DocFlavor.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/print/DocFlavor.java,v
retrieving revision 1.1
diff -u -r1.1 DocFlavor.java
--- javax/print/DocFlavor.java 26 Apr 2004 21:08:22 -0000 1.1
+++ javax/print/DocFlavor.java 27 Apr 2004 11:57:17 -0000
@@ -1,4 +1,4 @@
-/* Doc.java --
+/* DocFlavor.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,8 @@
*/
public class DocFlavor implements Cloneable, Serializable
{
+ private static final long serialVersionUID = -4512080796965449721L;
+
public static final String hostEncoding = "US-ASCII";
private String mediaSubtype;
Index: javax/print/ServiceUIFactory.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/print/ServiceUIFactory.java,v
retrieving revision 1.1
diff -u -r1.1 ServiceUIFactory.java
--- javax/print/ServiceUIFactory.java 26 Apr 2004 21:08:22 -0000 1.1
+++ javax/print/ServiceUIFactory.java 27 Apr 2004 11:57:17 -0000
@@ -43,15 +43,15 @@
*/
public abstract class ServiceUIFactory
{
- public static int ABOUT_UIROLE = 1;
- public static int ADMIN_UIROLE = 2;
- public static int MAIN_UIROLE = 3;
- public static int RESERVED_UIROLE = 99;
+ public static final int ABOUT_UIROLE = 1;
+ public static final int ADMIN_UIROLE = 2;
+ public static final int MAIN_UIROLE = 3;
+ public static final int RESERVED_UIROLE = 99;
- public static String DIALOG_UIROLE = "java.awt.Dialog";
- public static String JCOMPONENT_UIROLE = "javax.swing.JComponent";
- public static String JDIALOG_UIROLE = "javax.swing.JDialog";
- public static String PANEL_UIROLE = "java.awt.Panel";
+ public static final String DIALOG_UI = "java.awt.Dialog";
+ public static final String JCOMPONENT_UI = "javax.swing.JComponent";
+ public static final String JDIALOG_UI = "javax.swing.JDialog";
+ public static final String PANEL_UI = "java.awt.Panel";
/**
* Constructs a ServiceUIFactory
object.
Index: javax/print/AttributeException.java
===================================================================
RCS file: javax/print/AttributeException.java
diff -N javax/print/AttributeException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/AttributeException.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,63 @@
+/* CancelablePrintJob.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+import javax.print.attribute.Attribute;
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface AttributeException
+{
+ /**
+ * Returns the unsupported printing attribute classes for a print service
+ * that does not support them.
+ *
+ * @return array of unsupported attribute classes, or null
+ */
+ Class[] getUnsupportedAttributes();
+
+ /**
+ * Returns the unsupported values of printing attributes for a print service
+ * that does not support them.
+ *
+ * @return array of unsupperted attribute values, or null
+ */
+ Attribute[] getUnsupportedValues();
+}
Index: javax/print/MultiDoc.java
===================================================================
RCS file: javax/print/MultiDoc.java
diff -N javax/print/MultiDoc.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/MultiDoc.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,66 @@
+/* MultiDoc.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+import java.io.IOException;
+
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface MultiDoc
+{
+ /**
+ * Returns the current document.
+ *
+ * @return the current document
+ *
+ * @throws IOException if an error occurs
+ */
+ Doc getDoc() throws IOException;
+
+ /**
+ * Returns the next MultiDoc
object.
+ *
+ * @return the next MultiDoc
object
+ *
+ * @throws IOException if an error occurs
+ */
+ MultiDoc next() throws IOException;
+}
\ No newline at end of file
Index: javax/print/MultiDocPrintJob.java
===================================================================
RCS file: javax/print/MultiDocPrintJob.java
diff -N javax/print/MultiDocPrintJob.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/MultiDocPrintJob.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,60 @@
+/* MultiDocPrintJob.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+import javax.print.attribute.PrintRequestAttributeSet;
+
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface MultiDocPrintJob extends DocPrintJob
+{
+ /**
+ * Request a print of a MultiDoc
object.
+ *
+ * @param multiDoc the document to print
+ * @param attributes the printing attributes to apply
+ *
+ * @throws PrintExeption if an error occurs
+ */
+ void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes)
+ throws PrintException;
+}
+
\ No newline at end of file
Index: javax/print/MultiDocPrintService.java
===================================================================
RCS file: javax/print/MultiDocPrintService.java
diff -N javax/print/MultiDocPrintService.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/MultiDocPrintService.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,53 @@
+/* MultiDocPrintService.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface MultiDocPrintService extends PrintService
+{
+ /**
+ * Create a job that can print a MultiDoc
object.
+ *
+ * @return the new print job
+ */
+ MultiDocPrintJob createMultiDocPrintJob();
+}
\ No newline at end of file
Index: javax/print/StreamPrintService.java
===================================================================
RCS file: javax/print/StreamPrintService.java
diff -N javax/print/StreamPrintService.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/StreamPrintService.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,97 @@
+/* StreamPrintService.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+import java.io.OutputStream;
+
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public abstract class StreamPrintService implements PrintService
+{
+ private boolean disposed;
+ private OutputStream out;
+
+ /**
+ * Constructs a StreamPrintService
object.
+ *
+ * @param out the OutputStream
to use
+ */
+ protected StreamPrintService(OutputStream out)
+ {
+ this.out = out;
+ }
+
+ /**
+ * Dispose this StreamPrintService
object.
+ */
+ public void dispose()
+ {
+ disposed = true;
+ }
+
+ /**
+ * Returns the document format emited by this print service.
+ *
+ * @return the document format
+ */
+ public abstract String getOutputFormat();
+
+ /**
+ * Returns the OutputStream
of this object.
+ *
+ * @return the OutputStream
+ */
+ public OutputStream getOutputStream()
+ {
+ return out;
+ }
+
+ /**
+ * Determines if this StreamPrintService
object is disposed.
+ *
+ * @return true
if disposed already,
+ * otherwise false
+ */
+ public boolean isDisposed()
+ {
+ return disposed;
+ }
+}
\ No newline at end of file
Index: javax/print/URIException.java
===================================================================
RCS file: javax/print/URIException.java
diff -N javax/print/URIException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ javax/print/URIException.java 27 Apr 2004 11:57:17 -0000
@@ -0,0 +1,65 @@
+/* URIException.java --
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.print;
+
+import java.net.URI;
+
+/**
+ * @author Michael Koch (address@hidden)
+ */
+public interface URIException
+{
+ int URIInaccessible = 1;
+ int URIOtherProblem = -1;
+ int URISchemeNotSupported = 2;
+
+ /**
+ * Returns the reason for this exception.
+ *
+ * @return the reason
+ */
+ int getReason();
+
+ /**
+ * Returns the unsupported URI
for this exception.
+ *
+ * @return the unsupported URI
.
+ */
+ URI getUnsupportedURI();
+}
Index: javax/print/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/print/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- javax/print/Makefile.am 26 Apr 2004 21:31:04 -0000 1.3
+++ javax/print/Makefile.am 27 Apr 2004 11:57:17 -0000
@@ -3,12 +3,18 @@
SUBDIRS = attribute event
EXTRA_DIST = \
+AttributeException.java \
CancelablePrintJob.java \
Doc.java \
DocFlavor.java \
DonPrintJob.java \
FlavorException.java \
+MultiDoc.java \
+MultiDocPrintJob.java \
+MultiDocPrintService.java \
PrintException.java \
PrintService.java \
-ServiceUIFactory.java
+ServiceUIFactory.java \
+StreamPrintService.java \
+URIException.java