Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*     */ package org.dom4j.jaxb;
  /*     */ 
  /*     */ import java.io.File;
  /*     */ import java.io.FileOutputStream;
  /*     */ import java.io.IOException;
  /*     */ import java.io.OutputStream;
  /*     */ import java.io.Writer;
  /*     */ import javax.xml.bind.JAXBException;
  /*     */ import org.dom4j.io.OutputFormat;
 /*     */ import org.dom4j.io.XMLWriter;
 /*     */ import org.xml.sax.SAXException;
 /*     */ 
 /*     */ public class JAXBWriter extends JAXBSupport
 /*     */ {
 /*     */   private XMLWriter xmlWriter;
 /*     */   private OutputFormat outputFormat;
 /*     */ 
 /*     */   public JAXBWriter(String contextPath)
 /*     */   {
 /*  50 */     super(contextPath);
 /*  51 */     this. = new OutputFormat();
 /*     */   }
 /*     */ 
 /*     */   public JAXBWriter(String contextPathOutputFormat outputFormat)
 /*     */   {
 /*  67 */     super(contextPath);
 /*  68 */     this. = outputFormat;
 /*     */   }
 /*     */ 
 /*     */   public JAXBWriter(String contextPathClassLoader classloader)
 /*     */   {
 /*  85 */     super(contextPathclassloader);
 /*     */   }
 /*     */ 
 /*     */   public JAXBWriter(String contextPathClassLoader classloaderOutputFormat outputFormat)
 /*     */   {
 /* 104 */     super(contextPathclassloader);
 /* 105 */     this. = outputFormat;
 /*     */   }
 /*     */ 
 /*     */   public OutputFormat getOutputFormat()
 /*     */   {
 /* 114 */     return this.;
 /*     */   }
 /*     */ 
 /*     */   public void setOutput(File file)
 /*     */     throws IOException
 /*     */   {
 /* 128 */     getWriter().setOutputStream(new FileOutputStream(file));
 /*     */   }
 /*     */ 
 /*     */   public void setOutput(OutputStream outputStream)
 /*     */     throws IOException
 /*     */   {
 /* 142 */     getWriter().setOutputStream(outputStream);
 /*     */   }
 /*     */ 
 /*     */   public void setOutput(Writer writer)
 /*     */     throws IOException
 /*     */   {
 /* 154 */     getWriter().setWriter(writer);
 /*     */   }
 /*     */ 
 /*     */   public void startDocument()
 /*     */     throws IOExceptionSAXException
 /*     */   {
 /* 167 */     getWriter().startDocument();
 /*     */   }
 /*     */ 
 /*     */   public void endDocument()
 /*     */     throws IOExceptionSAXException
 /*     */   {
 /* 180 */     getWriter().endDocument();
 /*     */   }
 /*     */ 
 /*     */   public void write(javax.xml.bind.Element jaxbObject)
 /*     */     throws IOExceptionJAXBException
 /*     */   {
 /* 197 */     getWriter().write(marshal(jaxbObject));
 /*     */   }
 /*     */ 
 /*     */   public void writeClose(javax.xml.bind.Element jaxbObject)
 /*     */     throws IOExceptionJAXBException
 /*     */   {
 /* 216 */     getWriter().writeClose(marshal(jaxbObject));
 /*     */   }
 /*     */ 
 /*     */   public void writeOpen(javax.xml.bind.Element jaxbObject)
 /*     */     throws IOExceptionJAXBException
 /*     */   {
 /* 234 */     getWriter().writeOpen(marshal(jaxbObject));
 /*     */   }
 /*     */ 
 /*     */   public void writeElement(org.dom4j.Element element)
 /*     */     throws IOException
 /*     */   {
 /* 247 */     getWriter().write(element);
 /*     */   }
 /*     */ 
/*     */   public void writeCloseElement(org.dom4j.Element element)
/*     */     throws IOException
/*     */   {
/* 261 */     getWriter().writeClose(element);
/*     */   }
/*     */ 
/*     */   public void writeOpenElement(org.dom4j.Element element)
/*     */     throws IOException
/*     */   {
/* 275 */     getWriter().writeOpen(element);
/*     */   }
/*     */ 
/*     */   private XMLWriter getWriter() throws IOException {
/* 279 */     if (this. == null) {
/* 280 */       if (this. != null)
/* 281 */         this. = new XMLWriter(this.);
/*     */       else {
/* 283 */         this. = new XMLWriter();
/*     */       }
/*     */     }
/*     */ 
/* 287 */     return this.;
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.dom4j.jaxb.JAXBWriter
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X