Package java.io

Examples of java.io.DataInputStream.readLine()


  ack_receiver.start();
  in=new DataInputStream(System.in);
  while(true) {
      try {
    System.out.print("> ");
    line=in.readLine();
    if(line.startsWith("quit") || line.startsWith("exit"))
        break;
    tok=new StringTokenizer(line);
    try {
        dst=InetAddress.getByName(tok.nextToken());
View Full Code Here


  if (checkConnection) {
      try {
    Socket sock = new Socket(mailHost,25);
    DataInputStream in = new DataInputStream(
      new BufferedInputStream(sock.getInputStream()));
    String line = in.readLine();
    in.close();
    sock.close();
    server.log(Server.LOG_DIAGNOSTIC, prefix, line);
    if (line.startsWith("220")) {
        return true;
View Full Code Here

      assertEquals(2, t.size());
      if(t.get(0) != null) {
        // If underlying data-field is empty. PigStorage inserts null instead
        // of empty String objects.
        assertTrue(t.get(0) instanceof String);
        assertEquals(stream.readLine(), t.get(0));
      }
      else{
        assertTrue(stream.readLine().isEmpty());
      }
      assertTrue(t.get(1) instanceof String);
View Full Code Here

        // of empty String objects.
        assertTrue(t.get(0) instanceof String);
        assertEquals(stream.readLine(), t.get(0));
      }
      else{
        assertTrue(stream.readLine().isEmpty());
      }
      assertTrue(t.get(1) instanceof String);

      assertEquals("2010-10-10", t.get(1));
    }
View Full Code Here

    // Read the entire query
    boolean excludeQuery = false;
    String hadoopVer = ShimLoader.getMajorVersion();
    while (dis.available() != 0) {
      String line = dis.readLine();

      // While we are reading the lines, detect whether this query wants to be
      // excluded from running because the Hadoop version is incorrect
      Matcher matcher = pattern.matcher(line);
      if (matcher.find()) {
View Full Code Here

        while(true)
        {
          if(in.available() > 1)
          {
            str = in.readLine();
            addLog(str);
            System.out.println(str);
          }

          if(stop == true)
View Full Code Here

    DataInputStream dis = new DataInputStream(bis);
    StringBuffer qsb = new StringBuffer();
     
    // Read the entire query
    while(dis.available() != 0) {
      qsb.append(dis.readLine() + "\n");
    }
    qMap.put(qf.getName(), qsb.toString());
  }

  public void cleanUp() throws Exception {
View Full Code Here

     */
    public void endWriteOutputStream(WebResponse theResponse) throws IOException
    {
        DataInputStream dis = new DataInputStream(
            theResponse.getConnection().getInputStream());
        assertEquals("should not result in an error", dis.readLine());
    }

    //-------------------------------------------------------------------------

    /**
 
View Full Code Here

 
  in=new DataInputStream(System.in);
  while(true) {
      try {
    System.out.print("> ");
    line=in.readLine();
    if(line.startsWith("quit") || line.startsWith("exit"))
        break;
    tok=new StringTokenizer(line);
    try {
        dst=InetAddress.getByName(tok.nextToken());
View Full Code Here

  ack_receiver.start();
  in=new DataInputStream(System.in);
  while(true) {
      try {
    System.out.print("> ");
    line=in.readLine();
    if(line.startsWith("quit") || line.startsWith("exit"))
        break;
    tok=new StringTokenizer(line);
    try {
        dst=InetAddress.getByName(tok.nextToken());
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.