Package com.sun.xml.internal.txw2

Examples of com.sun.xml.internal.txw2.TxwException


/*     */
/*     */   public void flush() {
/*     */     try {
/* 135 */       this.out.flush();
/*     */     } catch (XMLStreamException e) {
/* 137 */       throw new TxwException(e);
/*     */     }
/*     */   }
View Full Code Here


/*  64 */         DocumentBuilder db = dbf.newDocumentBuilder();
/*  65 */         Document doc = db.newDocument();
/*  66 */         domResult.setNode(doc);
/*  67 */         this.serializer = new SaxSerializer(new Dom2SaxAdapter(doc), null, false);
/*     */       } catch (ParserConfigurationException pce) {
/*  69 */         throw new TxwException(pce);
/*     */       }
/*     */     else
/*  72 */       this.serializer = new SaxSerializer(new Dom2SaxAdapter(node), null, false);
/*     */   }
View Full Code Here

/*     */       {
/*  72 */         FileOutputStream fos = new FileOutputStream(fileURL);
/*  73 */         autoClose[0] = fos;
/*  74 */         this.writer = createWriter(fos);
/*     */       } catch (IOException e) {
/*  76 */         throw new TxwException(e);
/*     */       }
/*     */     } else {
/*  79 */       throw new IllegalArgumentException();
/*     */     }
/*     */
/*  82 */     this.serializer = new SaxSerializer(this.writer, this.writer, false, autoClose) {
/*     */       public void endDocument() {
/*  84 */         super.endDocument();
/*  85 */         if (this.val$autoClose[0] != null) {
/*     */           try {
/*  87 */             this.val$autoClose[0].close();
/*     */           } catch (IOException e) {
/*  89 */             throw new TxwException(e);
/*     */           }
/*  91 */           this.val$autoClose[0] = null;
/*     */         }
/*     */       } } ;
/*     */   }
View Full Code Here

/*     */   public void flush() {
/* 158 */     this.serializer.flush();
/*     */     try {
/* 160 */       this.writer.flush();
/*     */     } catch (IOException e) {
/* 162 */       throw new TxwException(e);
/*     */     }
/*     */   }
View Full Code Here

            try {
                FileOutputStream fos = new FileOutputStream(fileURL);
                autoClose[0] = fos;
                writer = createWriter(fos);
            } catch (IOException e) {
                throw new TxwException(e);
            }
        } else
            throw new IllegalArgumentException();

        // now delegate to the SaxSerializer
        serializer = new SaxSerializer(writer,writer,false) {
            public void endDocument() {
                super.endDocument();
                if(autoClose[0]!=null) {
                    try {
                        autoClose[0].close();
                    } catch (IOException e) {
                        throw new TxwException(e);
                    }
                    autoClose[0] = null;
                }
            }
        };
View Full Code Here

    public void flush() {
        serializer.flush();
        try {
            writer.flush();
        } catch (IOException e) {
            throw new TxwException(e);
        }
    }
View Full Code Here

    public void startDocument() {
        try {
            writer.startDocument();
        } catch (SAXException e) {
            throw new TxwException(e);
        }
    }
View Full Code Here

                    getQName(prefix, localName),
                    attrs);

            attrs.clear();
        } catch (SAXException e) {
            throw new TxwException(e);
        }
    }
View Full Code Here

            writer.endElement(elementBindings.pop(), // uri
                    elementBindings.pop(), // localName
                    elementBindings.pop()  // qname
            );
        } catch (SAXException e) {
            throw new TxwException(e);
        }
    }
View Full Code Here

    public void text(StringBuilder text) {
        try {
            writer.characters(text.toString().toCharArray(), 0, text.length());
        } catch (SAXException e) {
            throw new TxwException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.txw2.TxwException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.