Package java.io

Examples of java.io.DataInputStream.readLine()


            DataInputStream myInput = new DataInputStream(fis);
            Morceau m = null;
            Artiste a = null;
            Genre g = null;
            int counterInstrument = 0;
            while ((thisLine = myInput.readLine()) != null) {
                if (thisLine.startsWith("./")) {
                    String strar[] = thisLine.split("\\./");
                    String musique[] = strar[1].split(";");
                    String artiste = musique[0];
                    String titre = musique[1];
View Full Code Here


        final DataInputStream is = new DataInputStream(new BufferedInputStream(new FileInputStream(LOGFILE)));
        try {
            int count = 0;
            String str = "";
            while (is.available() != 0) {
                str = is.readLine();
                ++count;
            }
            assertTrue("Incorrect count " + count, count == 1);
            assertTrue("Bad data", str.endsWith("This is a test"));
        } finally {
View Full Code Here

        final FileInputStream fis = new FileInputStream(FILENAME);
        final DataInputStream is = new DataInputStream(new BufferedInputStream(fis));
        int counter = 0;
        String str = "";
        while (is.available() != 0) {
            str = is.readLine();
            //System.out.println(str);
            ++counter;
            final Matcher matcher = pattern.matcher(str);
            assertTrue("Bad data: " + str, matcher.matches());
        }
View Full Code Here

  File ret = null;
  if ( ! rep.exists() )
      return null;
  try {
      DataInputStream in = new DataInputStream(new FileInputStream(rep));
      String          nm = in.readLine();
      if ( nm.startsWith("/") )
    ret = new File(nm);
      else
    ret = new File(cvsroot, nm);
      in.close();
View Full Code Here

  throws IOException
    {
  DataInputStream in   = new DataInputStream(procin) ;
  String          line = null ;

  while ((line = in.readLine()) != null) {
      if ( into != null )
    into.append (line+"\n") ;
  }
  return into ;
    }
View Full Code Here

  throws IOException, CvsException
    {
  DataInputStream in   = new DataInputStream(procin) ;
  String          line = null ;

  while ((line = in.readLine()) != null) {
      if ( into != null )
    into.append (line+"\n") ;
      if ( line.startsWith("cvs commit:") ) {
    line = line.substring(12);
    if ( line.startsWith("Up-to-date check failed") ) {
View Full Code Here

    private void parseUpdateOutput (InputStream procin, UpdateHandler handler)
  throws IOException, CvsException
    {
  DataInputStream in   = new DataInputStream (procin) ;
  String          line = null ;
  while ((line = in.readLine()) != null) {
      // Make sure the line isn't empty:
      if ( line.length() <= 0 )
    continue;
      int status = -1 ;
      int ch     = line.charAt(0) ;
View Full Code Here

    private void parseCommitOutput(InputStream procin, CommitHandler handler)
  throws IOException, CvsException
    {
  DataInputStream in   = new DataInputStream (procin) ;
  String          line = null ;
  while ((line = in.readLine()) != null) {
      if ( ! line.startsWith ("Checking in ") )
    continue ;
      String filename = line.substring ("Checking in ".length()
                , line.length()-1) ;
      handler.notifyEntry(filename, FILE_OK);
View Full Code Here

      DataInputStream in = new DataInputStream(System.in) ;
     
      String line = null ;

      out.print("n ? ") ; out.flush() ;
      line = in.readLine() ;
      int n = Integer.parseInt(line) ;
      ArrayDictionary ad = new ArrayDictionary(n) ;

      String key = null, value = null;
      while(true) {
View Full Code Here

      ArrayDictionary ad = new ArrayDictionary(n) ;

      String key = null, value = null;
      while(true) {
    out.print("action ? ") ; out.flush() ;
    line = in.readLine() ;

    switch(line.charAt(0)) {
      case 'p':
      case 'P':
          out.print("key ? ") ; out.flush() ;
View Full Code Here

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.