Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.RecordInputStream


    public void processEvents(HSSFRequest req, InputStream in)
        throws IOException
  {
    try
    {
      genericProcessEvents(req, new RecordInputStream(in));
    }
    catch (HSSFUserException hue)
    {/*If an HSSFUserException user exception is thrown, ignore it.*/ }
  }
View Full Code Here


     */

    public short abortableProcessEvents(HSSFRequest req, InputStream in)
        throws IOException, HSSFUserException
    {
    return genericProcessEvents(req, new RecordInputStream(in));
    }
View Full Code Here

    public void processRecords(InputStream in)
        throws RecordFormatException
    {
        Record    last_record = null;

        RecordInputStream recStream = new RecordInputStream(in);

        while (recStream.hasNextRecord()) {
          recStream.nextRecord();
          Record[] recs = createRecord(recStream);   // handle MulRK records
                    if (recs.length > 1)
                    {
                        for (int k = 0; k < recs.length; k++)
                        {
View Full Code Here

    public void processRecords(InputStream in)
        throws RecordFormatException
    {
        Record    last_record = null;

        RecordInputStream recStream = new RecordInputStream(in);

        while (recStream.hasNextRecord()) {
          recStream.nextRecord();
          Record[] recs = createRecord(recStream);   // handle MulRK records
                    if (recs.length > 1)
                    {
                        for (int k = 0; k < recs.length; k++)
                        {
View Full Code Here

    public void processRecords(InputStream in)
        throws RecordFormatException
    {
        Record    last_record = null;

        RecordInputStream recStream = new RecordInputStream(in);

        while (recStream.hasNextRecord()) {
          recStream.nextRecord();
          Record[] recs = createRecord(recStream);   // handle MulRK records
                    if (recs.length > 1)
                    {
                        for (int k = 0; k < recs.length; k++)
                        {
View Full Code Here

    if (!Arrays.equals(data, SAMPLE_ENCODING)) {
      fail("Encoding differs");
    }
  }
  public void testDecode() {
    RecordInputStream in = new TestcaseRecordInputStream(0x0001, SAMPLE_ENCODING);
   
    Object[] values = ConstantValueParser.parse(in, 4);
    for (int i = 0; i < values.length; i++) {
      if(!isEqual(SAMPLE_VALUES[i], values[i])) {
        fail("Decoded result differs");
View Full Code Here

  /**
   * The correct size of a {@link ChartFormatRecord} is 20 bytes (not including header).
   */
  public void testLoad() {
    RecordInputStream in = TestcaseRecordInputStream.create(data);
    ChartFormatRecord record = new ChartFormatRecord(in);
    if (in.remaining() == 2) {
      throw new AssertionFailedError("Identified bug 44693d");
    }
    assertEquals(0, in.remaining());
    assertEquals(24, record.getRecordSize());

    byte[] data2 = record.serialize();
    assertArrayEquals(data, data2);
  }
View Full Code Here

    public void run()
        throws IOException
    {
        InputStream       din   = BiffViewer.getPOIFSInputStream(new File(file));
        RecordInputStream rinp  = new RecordInputStream(din);

        while(rinp.hasNextRecord()) {
           int sid  = rinp.getNextSid();
           rinp.nextRecord();
          
           int size = rinp.available();
           Class<? extends Record> clz = RecordFactory.getRecordClass(sid);
          
           System.out.print(
                 formatSID(sid) +
                 " - " +
                 formatSize(size) +
                 " bytes"
           );
           if(clz != null) {
              System.out.print("  \t");
              System.out.print(clz.getName().replace("org.apache.poi.hssf.record.", ""));
           }
           System.out.println();
          
           byte[] data = rinp.readRemainder();
           if(data.length > 0) {
              System.out.print("   ");
              System.out.println( formatData(data) );
           }
        }
View Full Code Here

    public void processEvents(HSSFRequest req, InputStream in)
        throws IOException
  {
    try
    {
      genericProcessEvents(req, new RecordInputStream(in));
    }
    catch (HSSFUserException hue)
    {/*If an HSSFUserException user exception is thrown, ignore it.*/ }
  }
View Full Code Here

     */

    public short abortableProcessEvents(HSSFRequest req, InputStream in)
        throws IOException, HSSFUserException
    {
    return genericProcessEvents(req, new RecordInputStream(in));
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.RecordInputStream

Copyright © 2018 www.massapicom. 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.