Package org.apache.xerces.impl.io

Examples of org.apache.xerces.impl.io.Latin1Reader


      throw new IOException(((MessageFormatter)localObject3).formatMessage((Locale)localObject4, "EncodingDeclInvalid", new Object[] { localObject2 }));
    }
    if (str1.equals("ASCII"))
      return new ASCIIReader((InputStream)localObject1, this.fTempString.ch.length, this.fErrorReporter.getMessageFormatter("http://www.w3.org/TR/1998/REC-xml-19980210"), this.fErrorReporter.getLocale());
    if (str1.equals("ISO8859_1"))
      return new Latin1Reader((InputStream)localObject1, this.fTempString.ch.length);
    return (Reader)(Reader)(Reader)(Reader)(Reader)(Reader)new InputStreamReader((InputStream)localObject1, str1);
  }
View Full Code Here


    boolean bool1 = XMLChar.isValidIANAEncoding(paramString);
    boolean bool2 = XMLChar.isValidJavaEncoding(paramString);
    if ((!bool1) || ((this.fAllowJavaEncodings) && (!bool2)))
    {
      this.fErrorReporter.reportError("http://www.w3.org/TR/1998/REC-xml-19980210", "EncodingDeclInvalid", new Object[] { paramString }, 2);
      return new Latin1Reader(paramInputStream, this.fBufferSize);
    }
    String str2 = EncodingMap.getIANA2JavaMapping(str1);
    if (str2 == null)
    {
      if (this.fAllowJavaEncodings)
      {
        str2 = paramString;
      }
      else
      {
        this.fErrorReporter.reportError("http://www.w3.org/TR/1998/REC-xml-19980210", "EncodingDeclInvalid", new Object[] { paramString }, 2);
        if (this.fTempByteBuffer == null)
          this.fTempByteBuffer = this.fByteBufferPool.getBuffer();
        return new Latin1Reader(paramInputStream, this.fTempByteBuffer);
      }
    }
    else
    {
      if (str2.equals("ASCII"))
      {
        if (this.fTempByteBuffer == null)
          this.fTempByteBuffer = this.fByteBufferPool.getBuffer();
        return new ASCIIReader(paramInputStream, this.fTempByteBuffer, this.fErrorReporter.getMessageFormatter("http://www.w3.org/TR/1998/REC-xml-19980210"), this.fErrorReporter.getLocale());
      }
      if (str2.equals("ISO8859_1"))
      {
        if (this.fTempByteBuffer == null)
          this.fTempByteBuffer = this.fByteBufferPool.getBuffer();
        return new Latin1Reader(paramInputStream, this.fTempByteBuffer);
      }
    }
    return new InputStreamReader(paramInputStream, str2);
  }
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.io.Latin1Reader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.