Package java.io

Examples of java.io.DataInputStream.readLine()


        }
        else if(command.equals("delete"))
        {
          System.out.println(accountName);
          System.out.print("\t>> ");
          String name = stdin.readLine().trim();
         
          Konto konto = bank.finde(name);
          if(konto == null)
            System.out.println(noSuchAccount);
          else
View Full Code Here


      System.out.println();
      System.out.println(commands);
      System.out.print("\t>> ");
     
      try {
        String command  = stdin.readLine().trim();
     
        if(command.equals("quit"))
        {
          isRunning = false;
          bankImpl.unbind();
View Full Code Here

                        {
                            // We have to skip any preamble to read the certificate
                            do
                            {
                                dis.mark(BEGIN_CERTIFICATE.length() * 2) ;
                                final String line = dis.readLine() ;
                                if (BEGIN_CERTIFICATE.equals(line))
                                {
                                    dis.reset() ;
                                    break ;
                                }
View Full Code Here

    protected String getHeaderValue(String frame, String header) throws IOException {
        DataInput input = new DataInputStream(new ByteArrayInputStream(frame.getBytes()));
        String line;
        for (int idx = 0; /* forever, sort of */; ++idx) {
            line = input.readLine();
            if (line == null) {
                // end of message, no headers
                return null;
            }
            line = line.trim();
View Full Code Here

            {
                u = HImage.class.getResource("/" + Settings.readme);
            }

            DataInputStream i = new DataInputStream(u.openStream());
            String tmp = i.readLine();
            tmp = tmp.substring(tmp.lastIndexOf(">") + 1);
            tmp = tmp.substring(0, tmp.indexOf("<"));

            return tmp;
        }
View Full Code Here

            {
                u = HImage.class.getResource("/" + Settings.readme);
            }

            DataInputStream i = new DataInputStream(u.openStream());
            String tmp = i.readLine();
            tmp = tmp.substring(tmp.lastIndexOf(">"));
            tmp = tmp.substring(tmp.indexOf(".") + 1);
            tmp = tmp.substring(0, tmp.indexOf("<"));

            int x = Integer.parseInt(tmp) + 1;
View Full Code Here

                String tmp = "";

                while(line)
                {
                    String x = in.readLine();

                    if(x == null)
                    {
                        break;
                    }
View Full Code Here

    protected String getHeaderValue(String frame, String header) throws IOException {
        DataInput input = new DataInputStream(new ByteArrayInputStream(frame.getBytes()));
        String line;
        for (int idx = 0; /* forever, sort of */; ++idx) {
            line = input.readLine();
            if (line == null) {
                // end of message, no headers
                return null;
            }
            line = line.trim();
View Full Code Here

        while (count < 2) {
            String receiveFrame = receiveFrame(10000);
            DataInput input = new DataInputStream(new ByteArrayInputStream(receiveFrame.getBytes()));
            String line;
            while (true) {
                line = input.readLine();
                if (line == null) {
                    throw new IOException("connection was closed");
                }
                else {
                    line = line.trim();
View Full Code Here

                    if (line.length() > 0) {
                        break;
                    }
                }
            }
            line = input.readLine();
            if (line == null) {
                throw new IOException("connection was closed");
            }
            String messageId = line.substring(line.indexOf(':') + 1);
            messageId = messageId.trim();
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.