org.eclipse.jdt.internal.compiler.tool
Class Util

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.tool.Util

public final class Util
extends Object

Util class that defines helper methods to read class contents with handling of wrong encoding


Nested Class Summary
static class Util.EncodingError
           
static class Util.EncodingErrorCollector
           
 
Field Summary
static String LINE_SEPARATOR
           
 
Constructor Summary
Util()
           
 
Method Summary
static CharSequence getCharContents(FileObject fileObject, boolean ignoreEncodingErrors, byte[] contents, String encoding)
           
static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

public static String LINE_SEPARATOR
Constructor Detail

Util

public Util()
Method Detail

getInputStreamAsCharArray

public static char[] getInputStreamAsCharArray(InputStream stream,
                                               int length,
                                               String encoding)
                                        throws IOException
Throws:
IOException

getCharContents

public static CharSequence getCharContents(FileObject fileObject,
                                           boolean ignoreEncodingErrors,
                                           byte[] contents,
                                           String encoding)
                                    throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.