Package java.io

Examples of java.io.DataInputStream.readUTF()


      String id = in.readUTF();
      int nbAppSessions = in.readInt();
     
      for (int i = 0; i < nbAppSessions; i++)
      {
        String appId = in.readUTF();
        System.out.println("read call: " + id + " / " + appId);
      }
           
      return null;
    }
View Full Code Here


      DataInputStream in = null;
      try {
        in = new DataInputStream(new BufferedInputStream(new FileInputStream(timestampsFile)));
        int size = in.readInt();
        while (size-- > 0) {
          String key = in.readUTF();
          long timestamp = in.readLong();
          timeStamps.put(Path.fromPortableString(key), new Long(timestamp));
        }
      } catch (IOException e) {
        if (timestampsFile.exists())
View Full Code Here

          if( data != null ) {
            bin = new ByteArrayInputStream( data );
            din = new DataInputStream( bin );
            int num = din.readInt();
            while( num-- > 0 ) {
              String name = din.readUTF();
              //#ifdef DLOGGING
//@              if (finestLoggable) {logger.finest("name=" + name);}
              //#endif
              String value;
              if (currentSettings) {
View Full Code Here

                        name + e.getMessage());
                    e.printStackTrace();
                  }
                }
              } else {
                value = din.readUTF();
              }
              //#ifdef DLOGGING
//@              if (finestLoggable) {logger.finest("value=" + value);}
              //#endif
              m_properties.put( name, value );
View Full Code Here

                               DbConstants.DB_SET_RANGE | flags) != DbConstants.DB_NOTFOUND)
                {
                    ByteArrayInputStream buffer =
                        new ByteArrayInputStream(key.getData());
                    DataInputStream in = new DataInputStream(buffer);
                    String name = in.readUTF();
               
                    in.close();
                    list.add(name);

                    while (cursor.get(key, data,
View Full Code Here

                    while (cursor.get(key, data,
                                      DbConstants.DB_NEXT | flags) != DbConstants.DB_NOTFOUND) {
                        buffer = new ByteArrayInputStream(key.getData());
                        in = new DataInputStream(buffer);
                        name = in.readUTF();
                        in.close();

                        list.add(name);
                    }
                }
View Full Code Here

                // TODO see if LockMode should be set
                if (cursor.getNext(key, data, null) != OperationStatus.NOTFOUND) {
                    ByteArrayInputStream buffer = new ByteArrayInputStream(key
                            .getData());
                    DataInputStream in = new DataInputStream(buffer);
                    String name = in.readUTF();

                    in.close();
                    list.add(name);

                    while (cursor.getNext(key, data, null) != OperationStatus.NOTFOUND) {
View Full Code Here

                    list.add(name);

                    while (cursor.getNext(key, data, null) != OperationStatus.NOTFOUND) {
                        buffer = new ByteArrayInputStream(key.getData());
                        in = new DataInputStream(buffer);
                        name = in.readUTF();
                        in.close();

                        list.add(name);
                    }
                }
View Full Code Here

                fileCount = in.readInt();
                names = new String[fileCount];
                // 2) for each file:
                for(int i=0; i<fileCount; i++) {
                    // 2.0) a UTF String, the filename of the file being uploaded
                    fileName = in.readUTF();
                    // 2.1) a long, the length of the file in bytes
                    long length = in.readLong();
                    // create the local temp file
                    //File temp = File.createTempFile("remote-deploy", "");
                    // Note: Doing this because WAR files have to be their original names to
View Full Code Here

  void sendMessage(int port, final String msg, final String expectedResponse) throws IOException {
      Socket socket = new Socket((String) null, port);
      DataInputStream reader = new DataInputStream(socket.getInputStream());
      DataOutputStream writer = new DataOutputStream(socket.getOutputStream());
      writer.writeUTF(msg);
      String response = reader.readUTF();
      assertEquals(expectedResponse, response);
      reader.close();
      writer.close();
      socket.close();
  }
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.