Logo
Distributed Genetic Programming Framework
print print

File org.sfc.xml.formats.CSSWriter.java

Here you can find all the information about the file org.sfc.xml.formats.CSSWriter.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2005 Thomas Weise
 * 
 * E-Mail           : tweise@gmx.de
 * Creation Date    : 2005-08-20 19:19:03
 * Original Filename: org.sfc.xml.formats.CSSWriter.java
 * Version          : 1.0.2
 * Last modification: 2006-03-07
 *                by: Thomas Weise
 * 
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *                    
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */

 
package org.sfc.xml.formats;

import java.io.Writer;

import org.xml.sax.SAXException;

import org.sfc.io.IO;

/**
 * Use this class to produce cascading style sheets en masse.
 *
 * @author Thomas Weise
 */

public final  class CSSWriter extends Stylesheet
  {
/**
 * The internal writer.
 */

  private final Writer  m_writer ;
  
/**
 * Create a new css writer.
 * @param p_dest  The destination object.
 * @throws  SAXException  If something goes wrong with underlying sax.
 * @throws  CSSException  If something goes wrong.
 */

  public  CSSWriter (final Object p_dest) throws SAXException
    {
    super();
    this.m_writer = IO.get_writer(p_dest);
    if(this.m_writer == null)
      {
      throw new CSSException();
      }
    }
  
/**
 * Internally write a character.
 * @param p_char  The character to be written.
 * @throws  CSSException  If the io fails.
 */

  @Override
  final void  write (final  char  p_char) throws CSSException
    {
    try
      {
      this.m_writer.write(p_char);
      }
    catch(Exception l_t)
      {
      throw new CSSException(l_t);
      }
    }
  
/**
 * Internally write a string.
 * @param p_string  The string to be written.
 * @throws  SAXException  If something goes wrong with underlying sax.
 * @throws  CSSException  If something goes wrong.
 */

  @Override
  final void  write (final  String p_string) throws SAXException
    {
    try
      {
      this.m_writer.write(p_string);
      }
    catch(Exception l_t)
      {
      throw new CSSException(l_t);
      }
    }
  
/**
 * Finish the css document.
 * @throws  SAXException  If something goes wrong with underlying sax.
 * @throws  CSSException  If something goes wrong.
 */

  @Override
  public  final void  end_stylesheet  ()  throws SAXException
    {
    try
      {
      this.m_writer.close();
      }
    catch(Exception l_t)
      {
      throw new CSSException(l_t);
      }
    }
  }

File Information:

file name:CSSWriter.java
package:org.sfc.xml.formats
qualified name:org.sfc.xml.formats.CSSWriter.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/sfc/xml/formats/CSSWriter.java
size:3.041 KB (3114 B)
uploaded: 2018-01-07 12:03:36 GMT+0000
last update: 2006-03-07 04:20:28 GMT+0000
last access: 2018-04-24 03:11:42 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2018-01-07 12:03:34 GMT+0000 served at 2018-04-24 03:11:42 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo