if (printName)
{
StringBuffer flowerbox = new StringBuffer();
flowerbox.append(".");
for (int j = 0; j < filename.length(); j++)
{
flowerbox.append("-");
}
flowerbox.append(".");
System.out.println(flowerbox);
System.out.println("|" + filename + "|");
System.out.println(flowerbox);
}
try
{
POIFSViewable fs =
new POIFSFileSystem(new FileInputStream(filename));
List strings = POIFSViewEngine.inspectViewable(fs, true,
0, " ");
Iterator iter = strings.iterator();
while (iter.hasNext())
{
System.out.print(iter.next());
}
}
catch (IOException e)
{
System.out.println(e.getMessage());
}