java.lang.Object
javax.print.SimpleDoc
- All Implemented Interfaces:
- Doc
- See Also:
- Source Code
public DocAttributeSet getAttributes()
- See Also:
- Doc
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public DocFlavor getDocFlavor()
- See Also:
- Doc
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Object getPrintData()
throws IOException
- See Also:
- Doc,
getRepresentationClassName()
, getDocFlavor()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public Reader getReaderForText()
throws IOException
- See Also:
- Doc
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public InputStream getStreamForBytes()
throws IOException
- See Also:
- Doc
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public SimpleDoc(Object printData,
DocFlavor flavor,
DocAttributeSet attributes)
- See Also:
- IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1048]IllegalArgumentException, help!!!
By agu9899 { at } 163 { dot } com on 2004/10/13 05:10:54 Rate
help!!!
this is my code ,why my code run here ,the exception will be throw:
String PrintStr="just print test";
DocFlavor flavor=DocFlavor.SERVICE_FORMATTED.PRINTABLE;//????????????????????????
PrintService printService=PrintServiceLookup.
lookupDefaultPrintService ( ) ;
DocPrintJob job=printService.createPrintJob ( ) ;//??????????????????
PrintRequestAttributeSet paras=new
HashPrintRequestAttributeSet ( ) ;//??????????????????
DocAttributeSet das=new HashDocAttributeSet ( ) ;//??????????????????
Doc doc=new SimpleDoc ( PrintStr,flavor,das ) ;//when code
//run here the error occur :java.lang.IllegalArgumentException: data is not of declared type
try {
job.print ( doc,paras ) ;
}
catch ( PrintException pe ) {
pe.printStackTrace ( ) ;
}