Package java.io

Examples of java.io.DataInputStream.readLong()


                while(true) {
                    //  Read in the length of the frame
                    long length = in.readLong();

                    //  Read in the delay for the frame
                    long nanos = in.readLong();

                    //  Read in the frame image
                    byte[] b = new byte[(int)length];
                    in.readFully(b,0,(int)length);
                    ImageIcon icon = new ImageIcon(b);
View Full Code Here


        try {
          ByteArrayInputStream bais = new ByteArrayInputStream(data);
          DataInputStream is = new DataInputStream(bais);

          is.readLong();
          String logString = is.readUTF();
          logContent.append(logString + "\n");

          is.close();
          bais.close();
View Full Code Here

        }
        for (int i = 0; i < f.length; i++) {
            FileInputStream fin = new FileInputStream(f[i]);
            try {
                DataInputStream din = new DataInputStream(fin);
                long id = din.readLong();
                String sinkName = din.readUTF();
                messageId = Math.max(id, messageId);
                boolean urgent = din.readBoolean();
                String subject = din.readUTF();
                List<Recipient> recipientList = new ArrayList<Recipient>();
View Full Code Here

        }
        long p;
        int l;
        while (true) {
            try {
                p = is.readLong();
                l = is.readInt();
                this.put(Long.valueOf(p), Integer.valueOf(l));
            } catch (IOException e) {
                break;
            }
View Full Code Here

            fis = new FileInputStream(file);
            dis = new DataInputStream(fis);

            checkMagic(dis);

            return dis.readLong();
        } catch (SecurityException ex) {
            throw new FileSecurityException(this, "readHeartbeat", ex);
        } catch (FileNotFoundException ex) {
            throw new UnexpectedFileNotFoundException(this, "readHeartbeat",
                    ex);
View Full Code Here

    void processQuery(InputStream inStream) {

        try {
            DataInputStream dataIn     = new DataInputStream(inStream);
            int             databaseID = dataIn.readInt();
            long            sessionID  = dataIn.readLong();
            int             mode       = dataIn.readByte();
            Session session = DatabaseManager.getSession(databaseID,
                sessionID);
            Result resultIn = Result.newResult(session, mode, dataIn, rowIn);
View Full Code Here

                // the bytes with one call to input.read(b,0,len) when len > 8192
                // bytes, the loop in the Result.read() method handles this
                inStream = new DataInputStream(request.getInputStream());

                int  databaseID = inStream.readInt();
                long sessionID  = inStream.readLong();
                int  mode       = inStream.readByte();
                Session session = DatabaseManager.getSession(databaseID,
                    sessionID);
                Result resultIn = Result.newResult(session, mode, inStream,
                                                   rowIn);
View Full Code Here

      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())
          Util.log(e, "Unable to read external time stamps"); //$NON-NLS-1$
View Full Code Here

                // 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
                    // handle the case where no web.xml or context root was provided
                    File temp = new File(System.getProperty("java.io.tmpdir"), fileName.trim());
View Full Code Here

                  throw StandardException.newException(
                          SQLState.LOG_INCOMPATIBLE_FORMAT, dataDirectory);
              }
 
        int obsoleteVersion = dais.readInt();
        value = dais.readLong();
 
        if (SanityManager.DEBUG)
        {
          if (SanityManager.DEBUG_ON(LogToFile.DBG_FLAG))
                      SanityManager.DEBUG(LogToFile.DBG_FLAG,
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.