Package java.io

Examples of java.io.BufferedReader


        }

        protected void onAboutToShow() {
            if( scroller != null ) {
                try {
                    String text = FileCopyUtils.copyToString(new BufferedReader(new InputStreamReader(aboutTextPath
                            .getInputStream())));
                    scroller.setHtml(text);
                }
                catch (IOException e) {
                    final IllegalStateException exp =
View Full Code Here


    }

    @Override
    protected void initReaders() {
        try {
            eventAssignmentReader = new BufferedReader(
                    new InputStreamReader(new FileInputStream(new File(getFolder(), eventAssignmentFile)), "cp1252"));
        } catch (Exception ex) {
            logger.fatal("Konnte Datei nicht öffnen " + eventAssignmentFile, ex);
        }

        try {
            courseInstancesReader = new BufferedReader(
                    new InputStreamReader(new FileInputStream(new File(getFolder(), courseInstancesFile)), "cp1252"));
        } catch (Exception ex) {
            logger.fatal("Konnte Datei nicht öffnen " + courseInstancesFile, ex);
        }
    }
View Full Code Here

    public void setFixRelationShip(boolean fixRelationShip) {
        this.fixRelationShip = fixRelationShip;
    }

    public void setEventReader(Reader reader) {
        eventReader = new BufferedReader(reader);
    }
View Full Code Here

    public void setEventReader(Reader reader) {
        eventReader = new BufferedReader(reader);
    }

    public void setLocationReader(Reader reader) {
        locationReader = new BufferedReader(reader);
    }
View Full Code Here

    public void setLocationReader(Reader reader) {
        locationReader = new BufferedReader(reader);
    }

    public void setFeatureReader(Reader reader) {
        featureReader = new BufferedReader(reader);
    }
View Full Code Here

    public void setFeatureReader(Reader reader) {
        featureReader = new BufferedReader(reader);
    }

    public void setPersonReader(Reader reader) {
        personReader = new BufferedReader(reader);
    }
View Full Code Here

        return writer.toString();
    }

    public static String getFromFile(File file, int blockSize)
            throws IOException {
        BufferedReader reader = new BufferedReader(new FileReader(file));
        char character[] = new char[blockSize];
        StringBuilder sb = new StringBuilder(character.length);
        int ret;
        while ((ret = reader.read(character)) != -1) {
            sb.append(character, 0, ret);
        }

        return sb.toString();
    }
View Full Code Here

   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    //Reader fileReader = new InputStreamReader(MultiReader.class.getResourceAsStream("failing-case-20061108.txt"));
    Reader fileReader =  new FileReader("failing-case.txt");
    BufferedReader in = new BufferedReader(fileReader);
    int modelNumber = 0;
    PrintWriter currentOut = null;
    for (String line = in.readLine(); line != null; line = in.readLine()) {
      if (line.equals("<rdf:RDF")) {
        currentOut = new PrintWriter(new OutputStreamWriter(getProcessor(modelNumber++).getOutputStream()));
      }
      if (line.equals("</rdf:RDF>")) {
        currentOut.println(line);
View Full Code Here

     * @throws IOException
     * @since 4.3
     */
    public static String loadHeader(String fileName) throws IOException {
        FileReader fr = null;
        BufferedReader br = null;
        try {
            fr = new FileReader(fileName);
            br = new BufferedReader(fr);
            String header = br.readLine();
            if (header != null && header.indexOf('#') == 0) {
                header = header.substring(1);
            }
            return header;
        } finally {
            if (br != null) {
                br.close();
            }
            if (fr != null) {
                fr.close();
            }
        }
View Full Code Here

     */
    public Object transformDirect(Object value) throws TransformationException {
        ClobType source = (ClobType)value;
       
        try {
            BufferedReader reader = new BufferedReader (source.getCharacterStream());
            StringBuffer contents = new StringBuffer();
           
            int chr = reader.read();
            while (chr != -1 && contents.length() < DataTypeManager.MAX_STRING_LENGTH) {
                contents.append((char)chr);
                chr = reader.read();
            }
            reader.close();
            return contents.toString();        
           
        } catch (SQLException e) {
            throw new TransformationException(e, CorePlugin.Util.getString("failed_convert", new Object[] {getSourceType().getName(), getTargetType().getName()})); //$NON-NLS-1$           
        } catch(IOException e) {
View Full Code Here

TOP

Related Classes of java.io.BufferedReader

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.