Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 32454 invoked from network); 2 Jul 2007 10:29:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 10:29:17 -0000 Received: (qmail 96072 invoked by uid 500); 2 Jul 2007 10:29:19 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 96015 invoked by uid 500); 2 Jul 2007 10:29:19 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 95998 invoked by uid 99); 2 Jul 2007 10:29:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 03:29:19 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 03:29:15 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id CC85D1A981A; Mon, 2 Jul 2007 03:28:55 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r552460 - /maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java Date: Mon, 02 Jul 2007 10:28:55 -0000 To: commits@maven.apache.org From: ltheussl@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070702102855.CC85D1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ltheussl Date: Mon Jul 2 03:28:51 2007 New Revision: 552460 URL: http://svn.apache.org/viewvc?view=rev&rev=552460 Log: Remove LineBreaker Modified: maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java Modified: maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java?view=diff&rev=552460&r1=552459&r2=552460 ============================================================================== --- maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java (original) +++ maven/sandbox/trunk/doxia/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java Mon Jul 2 03:28:51 2007 @@ -19,11 +19,11 @@ * under the License. */ +import java.io.IOException; import java.io.Writer; import java.util.Stack; import org.apache.maven.doxia.sink.Sink; -import org.apache.maven.doxia.util.LineBreaker; import org.apache.maven.doxia.parser.Parser; /** @@ -35,8 +35,8 @@ /** System-dependent end-of-line string. */ private static final String EOL = System.getProperty( "line.separator" ); - /** Linebreaker for writing the result. */ - private final LineBreaker out; + /** For writing the result. */ + private final Writer out; /** Used to get the current position in numbered lists. */ private final Stack listStack = new Stack(); @@ -84,11 +84,11 @@ /** Constructor. * @param writer The writer for writing the result. - + @param fragment Indicates if the document is only a fragment. */ public FoSink( Writer writer, boolean fragment ) { - this.out = new LineBreaker( writer ); + this.out = writer; this.config = new FoConfiguration(); this.fragmentDocument = fragment; } @@ -889,13 +889,27 @@ /** {@inheritDoc} */ public void flush() { - out.flush(); + try + { + out.flush(); + } + catch ( IOException e ) + { + // TODO + } } /** {@inheritDoc} */ public void close() { - out.close(); + try + { + out.close(); + } + catch ( IOException e ) + { + // TODO + } } /** Writes the beginning of a FO document in aggregate mode. */ @@ -956,23 +970,30 @@ private void write( String text ) { - out.write( text, true ); + try + { + out.write( text ); + } + catch ( IOException e ) + { + // TODO + } } private void writeln( String text ) { - out.write( text, true ); + write( text ); newline(); } private void content( String text ) { - out.write( escaped( text ), true ); + write( escaped( text ) ); } private void newline() { - out.write( EOL, false ); + write( EOL ); } private String escaped( String text )