コード例 #1
0
ファイル: MessageWriter.java プロジェクト: cqm0609/isotypes
 /**
  * Append a hex (character encoded) bitmap to the output stream
  *
  * @param bitmap to be appended
  * @param output stream to append data to
  * @throws IOException if the data could not be written tot he output stream
  */
 private void appendHexBitmap(final Bitmap bitmap, final DataOutputStream output)
     throws IOException {
   final byte[] bitmap1 = charCodec.getBytes(bitmap.asHex(Bitmap.Id.PRIMARY));
   output.write(bitmap1);
   if (bitmap.isBitmapPresent(Bitmap.Id.SECONDARY)) {
     final byte[] bitmap2 = charCodec.getBytes(bitmap.asHex(Bitmap.Id.SECONDARY));
     output.write(bitmap2);
     if (bitmap.isBitmapPresent(Bitmap.Id.TERTIARY)) {
       final byte[] bitmap3 = charCodec.getBytes(bitmap.asHex(Bitmap.Id.TERTIARY));
       output.write(bitmap3);
     }
   }
 }
コード例 #2
0
ファイル: MessageWriter.java プロジェクト: cqm0609/isotypes
 /**
  * Write the supplied header string to the output stream
  *
  * @param header
  * @param output stream to append data to
  * @throws IOException if the data could not be written tot he output stream
  */
 public void appendHeader(final String header, final DataOutputStream output) throws IOException {
   output.write(charCodec.getBytes(header));
 }
コード例 #3
0
ファイル: MessageWriter.java プロジェクト: cqm0609/isotypes
 protected void write(final String data, final DataOutputStream output) throws IOException {
   write(charCodec.getBytes(data), output);
 }