/** * Gets the defragmented stream from this ole compound file. Used when * copying workbooks with macros * * @param psIndex the property storage index * @return the defragmented ole stream * @exception BiffException */ public byte[] getStream(int psIndex) throws BiffException { PropertyStorage ps = getPropertyStorage(psIndex); if (ps.size >= SMALL_BLOCK_THRESHOLD || ps.name.equalsIgnoreCase(ROOT_ENTRY_NAME)) { return getBigBlockStream(ps); } else { return getSmallBlockStream(ps); } }
/** * Gets the defragmented stream from this ole compound file. Used when * copying workbooks with macros * * @param psIndex the property storage index * @return the defragmented ole stream * @exception BiffException */ public byte[] getStream(int psIndex) throws BiffException { PropertyStorage ps = getPropertyStorage(psIndex); if (ps.size >= SMALL_BLOCK_THRESHOLD || ps.name.equalsIgnoreCase(ROOT_ENTRY_NAME)) { return getBigBlockStream(ps); } else { return getSmallBlockStream(ps); } }
/** * Gets the defragmented stream from this ole compound file * * @param streamName the stream name to get * @return the defragmented ole stream * @exception BiffException */ public byte[] getStream(String streamName) throws BiffException { PropertyStorage ps = findPropertyStorage(streamName, rootEntryPropertyStorage); // Property set can't be found from the direct hierarchy, so just // search on the name if (ps == null) { ps = getPropertyStorage(streamName); } if (ps.size >= SMALL_BLOCK_THRESHOLD || streamName.equalsIgnoreCase(ROOT_ENTRY_NAME)) { return getBigBlockStream(ps); } else { return getSmallBlockStream(ps); } }
/** * Gets the defragmented stream from this ole compound file * * @param streamName the stream name to get * @return the defragmented ole stream * @exception BiffException */ public byte[] getStream(String streamName) throws BiffException { PropertyStorage ps = findPropertyStorage(streamName, rootEntryPropertyStorage); // Property set can't be found from the direct hierarchy, so just // search on the name if (ps == null) { ps = getPropertyStorage(streamName); } if (ps.size >= SMALL_BLOCK_THRESHOLD || streamName.equalsIgnoreCase(ROOT_ENTRY_NAME)) { return getBigBlockStream(ps); } else { return getSmallBlockStream(ps); } }