Package org.apache.poi.util

Examples of org.apache.poi.util.LittleEndianByteArrayOutputStream.writeShort()


    int recSize = getRecordSize();
    int dataSize = recSize - 4;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);

    out.writeShort(sid);
    out.writeShort(dataSize);

    if (_uninterpretedData == null) {

      for (int i = 0; i < subrecords.size(); i++) {
        SubRecord record = subrecords.get(i);
View Full Code Here


  @Override
  public final int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
    out.writeShort(getSid());
    out.writeShort(dataSize);
    serialize(out);
    if (out.getWriteIndex() - offset != recSize) {
      throw new IllegalStateException("Error in serialization of (" + getClass().getName() + "): "
          + "Incorrect number of bytes written - expected "
View Full Code Here

  public final int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
    out.writeShort(getSid());
    out.writeShort(dataSize);
    serialize(out);
    if (out.getWriteIndex() - offset != recSize) {
      throw new IllegalStateException("Error in serialization of (" + getClass().getName() + "): "
          + "Incorrect number of bytes written - expected "
          + recSize + " but got " + (out.getWriteIndex() - offset));
View Full Code Here

  @Override
  public final int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
    out.writeShort(getSid());
    out.writeShort(dataSize);
    serialize(out);
    if (out.getWriteIndex() - offset != recSize) {
      throw new IllegalStateException("Error in serialization of (" + getClass().getName() + "): "
          + "Incorrect number of bytes written - expected "
View Full Code Here

  public final int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
    out.writeShort(getSid());
    out.writeShort(dataSize);
    serialize(out);
    if (out.getWriteIndex() - offset != recSize) {
      throw new IllegalStateException("Error in serialization of (" + getClass().getName() + "): "
          + "Incorrect number of bytes written - expected "
          + recSize + " but got " + (out.getWriteIndex() - offset));
View Full Code Here

  public int serialize(int offset, byte[] data) {
    int recSize = getRecordSize();
    int dataSize = recSize - 4;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);

    out.writeShort(sid);
    out.writeShort(dataSize);

    if (_uninterpretedData == null) {

      for (int i = 0; i < subrecords.size(); i++) {
View Full Code Here

    int recSize = getRecordSize();
    int dataSize = recSize - 4;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);

    out.writeShort(sid);
    out.writeShort(dataSize);

    if (_uninterpretedData == null) {

      for (int i = 0; i < subrecords.size(); i++) {
        SubRecord record = subrecords.get(i);
View Full Code Here

  public int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);

    out.writeShort(sid);
    out.writeShort(dataSize);

    if (_uninterpretedData == null) {

      for (int i = 0; i < subrecords.size(); i++) {
View Full Code Here

    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);

    out.writeShort(sid);
    out.writeShort(dataSize);

    if (_uninterpretedData == null) {

      for (int i = 0; i < subrecords.size(); i++) {
        SubRecord record = (SubRecord) subrecords.get(i);
View Full Code Here

  @Override
  public final int serialize(int offset, byte[] data) {
    int dataSize = getDataSize();
    int recSize = 4 + dataSize;
    LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
    out.writeShort(getSid());
    out.writeShort(dataSize);
    serialize(out);
    if (out.getWriteIndex() - offset != recSize) {
      throw new IllegalStateException("Incorrect number of bytes written - expected "
          + recSize + " but got " + (out.getWriteIndex() - offset));
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.