Examples of LittleEndianInputStream


Examples of org.apache.poi.util.LittleEndianInputStream

    }
    field_6_unknown = readRawData(in, remaining);
  }

  private static Ptg readRefPtg(byte[] formulaRawBytes) {
    LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes));
    byte ptgSid = in.readByte();
    switch(ptgSid) {
      case AreaPtg.sid:   return new AreaPtg(in);
      case Area3DPtg.sid: return new Area3DPtg(in);
      case RefPtg.sid:  return new RefPtg(in);
      case Ref3DPtg.sid:  return new Ref3DPtg(in);
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

                                 "6C, 00, " + //the smallest width in pixels allowed for the dropdown window
                                 "00, 00, " //num chars
                                 "00, " +      //compression flag
                                 "00");        //padding byte

        LittleEndianInputStream in = new LittleEndianInputStream(new ByteArrayInputStream(data));

        LbsDataSubRecord.LbsDropData lbs = new LbsDataSubRecord.LbsDropData(in);

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        lbs.serialize(new LittleEndianOutputStream(baos));
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

       assertEquals(4, b[0]);
       assertEquals(0, b[1]);
       assertEquals(0x5c, b[2]);
       assertEquals(0x01, b[3]);
      
       LittleEndianInputStream inp = new LittleEndianInputStream(
             new ByteArrayInputStream(b)
       );
       fr = new FormatRun(inp);
       assertEquals(4, fr.getCharacterPos());
       assertEquals(0x15c, fr.getFontIndex());
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

      
      
       // Load in again and re-test
       byte[] data = new byte[14];
       System.arraycopy(b, 4, data, 0, data.length);
       LittleEndianInputStream inp = new LittleEndianInputStream(
             new ByteArrayInputStream(data)
       );
       ext = new ExtRst(inp, data.length);
      
       assertEquals(0, ext.getNumberOfRuns());
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

             00, 00, 00, 00,
             00, 00 // Cruft at the end, as found from real files
       };
       assertEquals(16, data.length);
      
       LittleEndianInputStream inp = new LittleEndianInputStream(
             new ByteArrayInputStream(data)
       );
       ExtRst ext = new ExtRst(inp, data.length);
       assertEquals(0x0c, ext.getDataSize()); // Excludes 4 byte header
      
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

             0x79, 0x79, 0x11, 0x11,
             0x22, 0x22, 0x33, 0x33,
       };
       assertEquals(8, data.length);
      
       LittleEndianInputStream inp = new LittleEndianInputStream(
             new ByteArrayInputStream(data)
       );
       ExtRst ext = new ExtRst(inp, data.length);
      
       // Will be empty
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

    }
    field_6_unknown = readRawData(in, remaining);
  }

  private static Ptg readRefPtg(byte[] formulaRawBytes) {
    LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes));
    byte ptgSid = in.readByte();
    switch(ptgSid) {
      case AreaPtg.sid:   return new AreaPtg(in);
      case Area3DPtg.sid: return new Area3DPtg(in);
      case RefPtg.sid:  return new RefPtg(in);
      case Ref3DPtg.sid:  return new Ref3DPtg(in);
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

    if (is instanceof LittleEndianInput) {
      // accessing directly is an optimisation
      return (LittleEndianInput) is;
    }
    // less optimal, but should work OK just the same. Often occurs in junit tests.
    return new LittleEndianInputStream(is);
  }
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

    if (is instanceof LittleEndianInput) {
      // accessing directly is an optimisation
      return (LittleEndianInput) is;
    }
    // less optimal, but should work OK just the same. Often occurs in junit tests.
    return new LittleEndianInputStream(is);
  }
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream

    if (in instanceof LittleEndianInput) {
      // accessing directly is an optimisation
      _le = (LittleEndianInput) in;
    } else {
      // less optimal, but should work OK just the same. Often occurs in junit tests.
      _le = new LittleEndianInputStream(in);
    }
  }
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.