org.apache.cocoon.components.serializers.encoding
Class Compiler

java.lang.Object
  extended by org.apache.cocoon.components.serializers.encoding.AbstractCharset
      extended by org.apache.cocoon.components.serializers.encoding.CompiledCharset
          extended by org.apache.cocoon.components.serializers.encoding.Compiler
All Implemented Interfaces:
Charset, Verifier

public class Compiler
extends CompiledCharset

Version:
$Id: Compiler.java 587752 2007-10-24 02:47:02Z vgritsenko $

Field Summary
 
Fields inherited from class org.apache.cocoon.components.serializers.encoding.CompiledCharset
encoding
 
Method Summary
protected  boolean compile(char c)
          Return true or false wether this encoding can encode the specified character or not.
static void main(String[] args)
          Compile all java.nio.charset.Charset classes and generate the main holding encodings table.
static Compiler process(Charset charset)
          Process a NIO Charset producing a java source file.
 void save()
          Save this Charset into a Java source file.
 void save(File directory)
          Save this Charset into a Java source file.
 void save(OutputStream stream)
          Save this Charset as a Java source file to the specified OutputStream.
 
Methods inherited from class org.apache.cocoon.components.serializers.encoding.CompiledCharset
allows, compile
 
Methods inherited from class org.apache.cocoon.components.serializers.encoding.AbstractCharset
equals, equals, getAliases, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

compile

protected boolean compile(char c)
Return true or false wether this encoding can encode the specified character or not.

This method is equivalent to the allows(...) method, but it will be called upon construction of the encoding table.

Specified by:
compile in class CompiledCharset

save

public void save()
          throws IOException
Save this Charset into a Java source file.

Throws:
IOException

save

public void save(File directory)
          throws IOException
Save this Charset into a Java source file.

Throws:
IOException

save

public void save(OutputStream stream)
          throws IOException
Save this Charset as a Java source file to the specified OutputStream.

Throws:
IOException

process

public static Compiler process(Charset charset)
                        throws IOException
Process a NIO Charset producing a java source file.

Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Compile all java.nio.charset.Charset classes and generate the main holding encodings table.

Throws:
IOException


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.