Package org.apache.poi.hssf.record

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


                retval = new UnknownRecord(in);
            }
        }
        catch (Exception introspectionException)
        {
            throw new RecordFormatException("Unable to construct record instance" , introspectionException);
        }
        if (retval instanceof RKRecord)
        {
            RKRecord     rk  = ( RKRecord ) retval;
            NumberRecord num = new NumberRecord();
View Full Code Here


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

        }
        else {
                    if (rec instanceof UnknownRecord) {
                        ;//silently skip records we don't know about
                    } else {
              throw new RecordFormatException("Records should handle ContinueRecord internally. Should not see this exception");
                    }
        }
      }

      // Update our tracking of the last record
View Full Code Here

      return field_2_first_col;
    }   

    public String toFormulaString(HSSFWorkbook book)
    {
        throw new RecordFormatException("Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate, but it wasn't");
    }
View Full Code Here

          token_3_arrayValues[x][y] = new Double(in.readDouble());
        } else if (grbit == 0x02) {
          //Ignore the doco, it is actually a unicode string with all the
          //trimmings ie 16 bit size, option byte etc
          token_3_arrayValues[x][y] = in.readUnicodeString();
        } else throw new RecordFormatException("Unknown grbit '"+grbit+"' at " + x + "," + y + " with " + in.remaining() + " bytes left");
      }
        }
    }
View Full Code Here

            for ( int i = 0; i < data.length; i++ )
                deflaterOutputStream.write( data[i] );
        }
        catch ( IOException e )
        {
            throw new RecordFormatException( e.toString() );
        }

        return out.toByteArray();
    }
View Full Code Here

            while ( ( c = inflaterInputStream.read() ) != -1 )
                out.write( c );
        }
        catch ( IOException e )
        {
            throw new RecordFormatException( e.toString() );
        }
        return out.toByteArray();
    }
View Full Code Here

        field_1_rectX1 =  LittleEndian.getInt( data, pos + size );size+=4;
        field_2_rectY1 =  LittleEndian.getInt( data, pos + size );size+=4;
        field_3_rectX2 =  LittleEndian.getInt( data, pos + size );size+=4;
        field_4_rectY2 =  LittleEndian.getInt( data, pos + size );size+=4;
        bytesRemaining -= size;
        if (bytesRemaining != 0) throw new RecordFormatException("Expected no remaining bytes but got " + bytesRemaining);
//        remainingData  =  new byte[bytesRemaining];
//        System.arraycopy( data, pos + size, remainingData, 0, bytesRemaining );
        return 8 + size + bytesRemaining;
    }
View Full Code Here

        int pos = offset+8+thedata.length;

        listener.afterRecordSerialize( pos, getRecordId(), pos - offset, this );
        int size = pos - offset;
        if (size != getRecordSize())
            throw new RecordFormatException(size + " bytes written but getRecordSize() reports " + getRecordSize());
        return size;
    }
View Full Code Here

                {
                } );
            }
            catch ( Exception illegalArgumentException )
            {
                throw new RecordFormatException(
                        "Unable to determine record types" );
            }
            result.put( new Short( sid ), constructor );
        }
        return result;
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.