Package org.teiid.core.util

Source Code of org.teiid.core.util.TestInputStreamReader

package org.teiid.core.util;

import static org.junit.Assert.*;

import java.io.ByteArrayInputStream;
import java.nio.charset.Charset;

import org.junit.Test;

@SuppressWarnings("nls")
public class TestInputStreamReader {

  @Test public void testMultiByte() throws Exception {
    InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(new byte[] {(byte)80, (byte)-61, (byte)-70}), Charset.forName("UTF-8").newDecoder(), 2);
    assertEquals(80, isr.read());
    assertEquals(250, isr.read());
  }
}
TOP

Related Classes of org.teiid.core.util.TestInputStreamReader

TOP
Copyright © 2018 www.massapi.com. 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.