Package java.io

Examples of java.io.InputStreamReader


            ImportBTXml.overwriteSettings(settings);
            ImportBTXml importer = new ImportBTXml(dataPool, fileOrFolder);
            importer.setDataPoolSettings(settings);
            importer.doWork();
        } else {
            InputStreamReader reader = new InputStreamReader(new FileInputStream(fileOrFolder));

            DataPool4Track2 dataPool4Track2 = new DataPool4Track2();
            dataPool4Track2.setSettings(settings);
            dataPool4Track2.setDataPool(dataPool);
            dataPool4Track2.setSource(reader);
View Full Code Here


    }

    @Override
    public int read(char[] cbuf, int off, int len) throws IOException {
      if (r == null) {
        r = new InputStreamReader(isf.getInputStream(), Streamable.ENCODING);
      }
      return r.read(cbuf, off, len);
    }
View Full Code Here

        }
        deleteDb("scriptSimple");
        reconnect();
        String inFile = "org/h2/test/testSimple.in.txt";
        InputStream is = getClass().getClassLoader().getResourceAsStream(inFile);
        LineNumberReader lineReader = new LineNumberReader(new InputStreamReader(is, "Cp1252"));
        ScriptReader reader = new ScriptReader(lineReader);
        while (true) {
            String sql = reader.readStatement();
            if (sql == null) {
                break;
View Full Code Here

     */
    public static char[] convertToCharArray(InputStream stream, int length, String encoding)
        throws IOException {
      Reader r = null;
      if (encoding == null) {
        r = new InputStreamReader(stream);
      } else {
        r = new InputStreamReader(stream, encoding);
      }
        return convertToCharArray(r, length);
    }
View Full Code Here

        p2.load(rs.getBinaryStream(1));
        assertEquals(prop.size(), p2.size());
        rs = stat.executeQuery("SELECT FILE_READ('" + fileName + "', NULL) PROP");
        rs.next();
        String ps = rs.getString(1);
        InputStreamReader r = new InputStreamReader(IOUtils.openFileInputStream(fileName));
        String ps2 = IOUtils.readStringAndClose(r, -1);
        assertEquals(ps, ps2);
        conn.close();
        IOUtils.delete(fileName);
    }
View Full Code Here

        }
    }

    private void testFile(String inFile) throws Exception {
        InputStream is = getClass().getClassLoader().getResourceAsStream(inFile);
        in = new LineNumberReader(new InputStreamReader(is, "Cp1252"));
        StringBuilder buff = new StringBuilder();
        while (true) {
            String sql = readLine();
            if (sql == null) {
                break;
View Full Code Here

    /**
     * Read fully from stream
     */
    public final static String readFully(InputStream input) throws IOException {
        StringWriter writer = new StringWriter();
        InputStreamReader reader = new InputStreamReader(input);
        copy(reader, writer, 1024);
        return writer.toString();
    }
View Full Code Here

      BufferedReader br = null;
      try {
        Socket sck = socket.accept();
        String address = sck.getInetAddress().getHostAddress();
        if (address.equals("localhost") || address.equals("127.0.0.1")) {
          br = new BufferedReader(new InputStreamReader(sck.getInputStream(),Constants.DEFAULT_ENCODING));
          String line = br.readLine();
          //System.out.println("received : " + line);
         
          if (Logger.isEnabled())
            Logger.log(new LogEvent(LOGID, "Main::startServer: received '"
View Full Code Here

            FtpServer server = addUser.getConfiguration(args);
            if (server == null) {
                return;
            }
           
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           
            UserManager um = ((DefaultFtpServer)server).getUserManager();
           
            BaseUser user = new BaseUser();
View Full Code Here

    public XQueryModule parse(InputStream is) throws XQueryException {
        return parse(is, null);
    }

    public XQueryModule parse(InputStream is, URI baseUri) throws XQueryException {
        return parse(new InputStreamReader(is), baseUri);
    }
View Full Code Here

TOP

Related Classes of java.io.InputStreamReader

Copyright © 2015 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.