Package java.io

Examples of java.io.DataOutputStream.writeByte()


      ByteArrayOutputStream bs = new ByteArrayOutputStream();
      DataOutputStream out = new DataOutputStream(bs);

      try
      {
         out.writeByte(this.getResponseCode() & 0x7F); // RESPONSE CODE (wipe Reserved bit)
         out.writeByte(this.getSenseKey().value());
         out.writeByte(this.getSenseCode());
         out.writeByte(this.getSenseCodeQualifier());
         out.writeInt(0); // 3-byte reserved field, ADDITIONAL SENSE LENGTH = 0
      }
View Full Code Here


         out.writeByte(tmp);
        
         out.writeInt(this.lba);
         out.writeByte(this.groupNumber);
         out.writeShort(this.verificationLength);
         out.writeByte(super.getControl());

         return cdb.toByteArray();
      }
      catch (IOException e)
      {
View Full Code Here

      DataOutputStream out = new DataOutputStream(bs);

      try
      {
         out.writeByte(this.getResponseCode() & 0x7F); // RESPONSE CODE (wipe Reserved bit)
         out.writeByte(this.getSenseKey().value());
         out.writeByte(this.getSenseCode());
         out.writeByte(this.getSenseCodeQualifier());
         out.writeInt(0); // 3-byte reserved field, ADDITIONAL SENSE LENGTH = 0
      }
      catch (IOException e)
View Full Code Here

      try
      {
         out.writeByte(this.getResponseCode() & 0x7F); // RESPONSE CODE (wipe Reserved bit)
         out.writeByte(this.getSenseKey().value());
         out.writeByte(this.getSenseCode());
         out.writeByte(this.getSenseCodeQualifier());
         out.writeInt(0); // 3-byte reserved field, ADDITIONAL SENSE LENGTH = 0
      }
      catch (IOException e)
      {
View Full Code Here

      try
      {
         out.writeByte(this.getResponseCode() & 0x7F); // RESPONSE CODE (wipe Reserved bit)
         out.writeByte(this.getSenseKey().value());
         out.writeByte(this.getSenseCode());
         out.writeByte(this.getSenseCodeQualifier());
         out.writeInt(0); // 3-byte reserved field, ADDITIONAL SENSE LENGTH = 0
      }
      catch (IOException e)
      {
         throw new RuntimeException("Unable to encode descriptor format sense data");
View Full Code Here

      ByteArrayOutputStream cdb = new ByteArrayOutputStream(this.size());
      DataOutputStream out = new DataOutputStream(cdb);

      try
      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(this.DBD ? 0x08 : 0x00);
         out.writeByte((this.PC << 6) | this.pageCode);
         out.writeByte(this.subPageCode);
         out.writeByte((int) getAllocationLength());
         out.writeByte(super.getControl());
View Full Code Here

      DataOutputStream out = new DataOutputStream(cdb);

      try
      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(this.DBD ? 0x08 : 0x00);
         out.writeByte((this.PC << 6) | this.pageCode);
         out.writeByte(this.subPageCode);
         out.writeByte((int) getAllocationLength());
         out.writeByte(super.getControl());
View Full Code Here

      try
      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(this.DBD ? 0x08 : 0x00);
         out.writeByte((this.PC << 6) | this.pageCode);
         out.writeByte(this.subPageCode);
         out.writeByte((int) getAllocationLength());
         out.writeByte(super.getControl());

         return cdb.toByteArray();
View Full Code Here

      try
      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(this.DBD ? 0x08 : 0x00);
         out.writeByte((this.PC << 6) | this.pageCode);
         out.writeByte(this.subPageCode);
         out.writeByte((int) getAllocationLength());
         out.writeByte(super.getControl());

         return cdb.toByteArray();
      }
View Full Code Here

      {
         out.writeByte(OPERATION_CODE);
         out.writeByte(this.DBD ? 0x08 : 0x00);
         out.writeByte((this.PC << 6) | this.pageCode);
         out.writeByte(this.subPageCode);
         out.writeByte((int) getAllocationLength());
         out.writeByte(super.getControl());

         return cdb.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.