Package java.io

Examples of java.io.DataOutputStream.writeLong()


      dataOut.writeLong(0);
      dataOut.writeLong(0);
      dataOut.writeLong(0);
      dataOut.writeLong(0);
      dataOut.writeLong(0);
      dataOut.writeLong(0);

      StandardInquiryData sid = new StandardInquiryData();

      // Decode
      sid.decode(ByteBuffer.wrap(byteOut.toByteArray()));
View Full Code Here


         out.writeByte(OPERATION_CODE);

         out.writeByte(super.encodeByte1());

         // CAUTION: Signed longs represent unsigned longs
         out.writeLong(getLogicalBlockAddress());
         out.writeInt((int) getTransferLength());

         out.writeByte(getGroupNumber() & 0x1F);
         out.writeByte(super.getControl());
View Full Code Here

      this.LBA = logicalBlockAddress;

      try
      {
         out.writeLong(0);
         out.writeLong(logicalBlockAddress);
         out.close();
      }
      catch (IOException e)
      {
View Full Code Here

      this.LBA = logicalBlockAddress;

      try
      {
         out.writeLong(0);
         out.writeLong(logicalBlockAddress);
         out.close();
      }
      catch (IOException e)
      {
         throw new RuntimeException("Unable to create serialize exception parameter", e);
View Full Code Here

      this.LBA = logicalBlockAddress;

      try
      {
         out.writeLong(0);
         out.writeLong(logicalBlockAddress);
         out.close();
      }
      catch (IOException e)
      {
View Full Code Here

      this.LBA = logicalBlockAddress;

      try
      {
         out.writeLong(0);
         out.writeLong(logicalBlockAddress);
         out.close();
      }
      catch (IOException e)
      {
         throw new RuntimeException("Unable to create serialize exception parameter", e);
View Full Code Here

      try
      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(SERVICE_ACTION);
         out.writeLong(this.logicalBlockAddress);
         out.writeInt((int) this.getAllocationLength());
         out.writeByte(this.PMI ? 1 : 0);
         out.writeByte(super.getControl());

         return cdb.toByteArray();
View Full Code Here

         out.writeByte(OPERATION_CODE);

         out.writeByte(super.encodeByte1());

         // CAUTION: Signed longs represent unsigned longs
         out.writeLong(getLogicalBlockAddress());
         out.writeInt((int) getTransferLength());

         out.writeByte(getGroupNumber() & 0x1F);
         out.writeByte(super.getControl());
View Full Code Here

    ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(512);
    DataOutputStream dataOutput = new DataOutputStream(byteOutput);
    try {
      dataOutput.writeInt(MAGIC_HEADER);
      dataOutput.writeShort(record.getRecordType());
      dataOutput.writeLong(record.getTransactionID());
      dataOutput.writeLong(record.getLogWriteOrderID());
      record.write(dataOutput);
      dataOutput.flush();
      // TODO toByteArray does an unneeded copy
      return ByteBuffer.wrap(byteOutput.toByteArray());
View Full Code Here

    DataOutputStream dataOutput = new DataOutputStream(byteOutput);
    try {
      dataOutput.writeInt(MAGIC_HEADER);
      dataOutput.writeShort(record.getRecordType());
      dataOutput.writeLong(record.getTransactionID());
      dataOutput.writeLong(record.getLogWriteOrderID());
      record.write(dataOutput);
      dataOutput.flush();
      // TODO toByteArray does an unneeded copy
      return ByteBuffer.wrap(byteOutput.toByteArray());
    } catch(IOException e) {
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.