Package org.apache.poi.hssf.record

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


            field_5_fileIdClusters[i] = new FileIdCluster(LittleEndian.getInt( data, pos + size ), LittleEndian.getInt( data, pos + size + 4 ));
            size += 8;
        }
        bytesRemaining         -= size;
        if (bytesRemaining != 0)
            throw new RecordFormatException("Expecting no remaining data but got " + bytesRemaining + " byte(s).");
        return 8 + size + bytesRemaining;
    }
View Full Code Here


        field_2_color2 =  LittleEndian.getInt( data, pos + size );size+=4;
        field_3_color3 =  LittleEndian.getInt( data, pos + size );size+=4;
        field_4_color4 =  LittleEndian.getInt( data, pos + size );size+=4;
        bytesRemaining -= size;
        if (bytesRemaining != 0)
            throw new RecordFormatException("Expecting no remaining data but got " + bytesRemaining + " byte(s).");
        return 8 + size + bytesRemaining;
    }
View Full Code Here

                        {
                            if (rectype == ContinueRecord.sid)
                            {
                                if (last_record == null)
                                {
                                    throw new RecordFormatException(
                                        "First record is a ContinueRecord??");
                                }
                                last_record.processContinueRecord(data);
                            }
                            else
                            {
                                if (last_record != null) {
                                    if (throwRecordEvent(last_record) == false && abortable == true) {
                                        last_record = null;
                                        break;  
                                    }
                                }
                               
                                last_record = record;
                               
                                //records.add(record);
                            }
                        }
                    }
                }
            }
            while (rectype != 0);
           
            if (last_record != null) {
               throwRecordEvent(last_record);              
            }
        }
        catch (IOException e)
        {
            throw new RecordFormatException("Error reading bytes");
        }

        // Record[] retval = new Record[ records.size() ];
        // retval = ( Record [] ) records.toArray(retval);
    
View Full Code Here

            }
        }
        catch (Exception introspectionException)
        {
            introspectionException.printStackTrace();
            throw new RecordFormatException(
                "Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
        }
        if (retval instanceof RKRecord)
        {
            RKRecord     rk  = ( RKRecord ) retval;
View Full Code Here

                    short.class, short.class, byte [].class
                });
            }
            catch (Exception illegalArgumentException)
            {
                throw new RecordFormatException(
                    "Unable to determine record types");
            }
            result.put(new Short(sid), constructor);
        }
        return result;
View Full Code Here

        if (userCode != 0) break process;
      }
    }
    catch (IOException e)
    {
      throw new RecordFormatException("Error reading bytes" +
                        "while processing record sid="+sid);
    }
    return userCode;

    // Record[] retval = new Record[ records.size() ];
View Full Code Here

        if (userCode != 0) break process;
      }
    }
    catch (IOException e)
    {
      throw new RecordFormatException("Error reading bytes" +
                        "while processing record sid="+sid);
    }
    return userCode;

    // Record[] retval = new Record[ records.size() ];
View Full Code Here

    return true;
  }

  private void checkNotPresent(Record rec) {
    if (rec != null) {
      throw new RecordFormatException("Duplicate PageSettingsBlock record (sid=0x"
          + Integer.toHexString(rec.getSid()) + ")");
    }
  }
View Full Code Here

  public void addLateHeaderFooter(Record rec) {
    if (_headerFooter != null) {
      throw new IllegalStateException("This page settings block already has a header/footer record");
    }
    if (rec.getSid() != UnknownRecord.HEADER_FOOTER_089C) {
      throw new RecordFormatException("Unexpected header-footer record sid: 0x" + Integer.toHexString(rec.getSid()));
    }
    _headerFooter = rec;
  }
View Full Code Here

    }

    public String toFormulaString()
    {
        // table(....)[][]
        throw new RecordFormatException("Table and Arrays are not yet supported");
    }
View Full Code Here

TOP

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

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.