More NPOIFS write testing, and fix a problem with writing xbat details out
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589806 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
166b8f6f8a
commit
a94f150450
@ -729,6 +729,11 @@ public class NPOIFSFileSystem extends BlockStore
|
|||||||
ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
|
ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
|
||||||
BlockAllocationTableWriter.writeBlock(bat, block);
|
BlockAllocationTableWriter.writeBlock(bat, block);
|
||||||
}
|
}
|
||||||
|
// XBats
|
||||||
|
for(BATBlock bat : _xbat_blocks) {
|
||||||
|
ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
|
||||||
|
BlockAllocationTableWriter.writeBlock(bat, block);
|
||||||
|
}
|
||||||
|
|
||||||
// SBATs
|
// SBATs
|
||||||
_mini_store.syncWithDataSource();
|
_mini_store.syncWithDataSource();
|
||||||
|
@ -512,13 +512,10 @@ public final class TestNPOIFSFileSystem {
|
|||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
fs.writeFilesystem(baos);
|
fs.writeFilesystem(baos);
|
||||||
|
|
||||||
// TODO Correct this to work
|
|
||||||
if(1==2) {
|
|
||||||
// Check that it is seen correctly
|
// Check that it is seen correctly
|
||||||
fs = new NPOIFSFileSystem(new ByteArrayInputStream(baos.toByteArray()));
|
fs = new NPOIFSFileSystem(new ByteArrayInputStream(baos.toByteArray()));
|
||||||
assertBATCount(fs, 237, 2);
|
assertBATCount(fs, 237, 2);
|
||||||
// TODO Do some more checks
|
// TODO Do some more checks
|
||||||
}
|
|
||||||
|
|
||||||
// All done
|
// All done
|
||||||
fs.close();
|
fs.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user