Package java.io

Examples of java.io.DataOutputStream.writeLong()


            ByteArrayOutputStream output = new ByteArrayOutputStream();
            DataOutputStream dataOut = new DataOutputStream(output);
            try
            {
                dataOut.writeLong(uuid.getMostSignificantBits());
                dataOut.writeLong(uuid.getLeastSignificantBits());
                dataOut.flush();
                dataOut.close();
            }
            catch (IOException e)
            {
View Full Code Here


            UUID uuid = UUID.randomUUID();
            ByteArrayOutputStream output = new ByteArrayOutputStream();
            DataOutputStream dataOut = new DataOutputStream(output);
            try
            {
                dataOut.writeLong(uuid.getMostSignificantBits());
                dataOut.writeLong(uuid.getLeastSignificantBits());
                dataOut.flush();
                dataOut.close();
            }
            catch (IOException e)
View Full Code Here

            ByteArrayOutputStream output = new ByteArrayOutputStream();
            DataOutputStream dataOut = new DataOutputStream(output);
            try
            {
                dataOut.writeLong(uuid.getMostSignificantBits());
                dataOut.writeLong(uuid.getLeastSignificantBits());
                dataOut.flush();
                dataOut.close();
            }
            catch (IOException e)
            {
View Full Code Here

                parent.mkdirs();
            }
            fout = new FileOutputStream(tmpTokenFile);
            keyOutputStream = new DataOutputStream(fout);
            keyOutputStream.writeInt(currentToken);
            keyOutputStream.writeLong(nextUpdate);
            for (int i = 0; i < currentTokens.length; i++) {
                if (currentTokens[i] == null) {
                    keyOutputStream.writeInt(0);
                } else {
                    keyOutputStream.writeInt(1);
View Full Code Here

     */
    public void append(FileRecord record) throws IOException {
        DataOutputStream out = new DataOutputStream(new FileOutputStream(file, true));
        try {
            if (isNew) {
                out.writeLong(record.getRevision());
            }
            record.append(out);
        } finally {
            out.close();
        }
View Full Code Here

            MessageDigest md = MessageDigest.getInstance("SHA");
            DigestOutputStream mdo = new DigestOutputStream(devnull, md);
            DataOutputStream data = new DataOutputStream(mdo);
            if (vt.parent != null)
            {
                data.writeLong(computeStructuralUID(vt.parent));
            }
            if (vt.hasWriteObject)
            {
                data.writeInt(2);
            }
View Full Code Here

            }
            out.writeInt(blockLength);
         }
         else if (getCommand().getCommandDescriptorBlock() instanceof ReadCapacity16)
         {
            out.writeLong(this.getDeviceCapacity());
            out.writeInt(blockLength);

            out.writeInt(0);
            out.writeLong(0);
            out.writeLong(0);
View Full Code Here

         {
            out.writeLong(this.getDeviceCapacity());
            out.writeInt(blockLength);

            out.writeInt(0);
            out.writeLong(0);
            out.writeLong(0);
         }
         else
         {
            throw new RuntimeException("Invalid CDB passed in ReadCapacityGridTask");
View Full Code Here

            out.writeLong(this.getDeviceCapacity());
            out.writeInt(blockLength);

            out.writeInt(0);
            out.writeLong(0);
            out.writeLong(0);
         }
         else
         {
            throw new RuntimeException("Invalid CDB passed in ReadCapacityGridTask");
         }
View Full Code Here

      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      DataOutputStream dataOut = new DataOutputStream(byteOut);

      // First 8 bytes
      dataOut.writeLong(0);

      // t10 vendor identification (8)
      dataOut.write(t10VendorIdentification);

      // 10 longs = 80 bytes
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.