Package org.apache.poi.poifs.filesystem

Examples of org.apache.poi.poifs.filesystem.POIFSFileSystem$CloseIgnoringInputStream


     */

    public void run()
        throws Exception
    {
        POIFSFileSystem fs      =
            new POIFSFileSystem(new FileInputStream(file));
        List            records =
            RecordFactory
                .createRecords(fs.createDocumentInputStream("Workbook"));

        for (int k = 0; k < records.size(); k++)
        {
            Record record = ( Record ) records.get(k);

View Full Code Here


   * @throws IOException if there is a problem while parsing the document.
   */
  public HSLFSlideShow(InputStream inputStream) throws IOException
  {
    //do Ole stuff
    this(new POIFSFileSystem(inputStream));
    istream = inputStream;
  }
View Full Code Here

            Metadata metadata, ParseContext context)
            throws IOException, SAXException, TikaException {
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();

        POIFSFileSystem filesystem = new POIFSFileSystem(stream);

        // Parse summary entries first, to make metadata available early
        new SummaryExtractor(metadata).parseSummaries(filesystem);

        // Parse remaining document entries
        boolean outlookExtracted = false;
        Iterator<?> entries = filesystem.getRoot().getEntries();
        while (entries.hasNext()) {
            Entry entry = (Entry) entries.next();
            String name = entry.getName();
            if (entry instanceof DirectoryEntry) {
               if ("Quill".equals(name)) {
View Full Code Here

                    } catch (RepositoryException e) {
                        throw new IOException(e.getMessage());
                    }

                    try {
                        POIFSFileSystem fs = new POIFSFileSystem(in);
                        HSSFWorkbook workbook = new HSSFWorkbook(fs);

                        for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
                            HSSFSheet sheet = workbook.getSheetAt(i);
View Full Code Here

      is = new ByteArrayInputStream((byte[]) obj);
    } else {
      throw new IllegalArgumentException("Parameter must be instance of byte[]");
    }

    POIFSFileSystem fs;
    HSSFWorkbook wb;
    try {
      fs = new POIFSFileSystem(is);
      wb = new HSSFWorkbook(fs);
      if (wb != null) {
        int Scount = wb.getNumberOfSheets();
        for (int s = 0; s < Scount; s++) {
          HSSFSheet sheet = wb.getSheetAt(s);
View Full Code Here

    public void run()
    {
        try
        {
            POIFSFileSystem fs =
                    new POIFSFileSystem(new FileInputStream(filename));
            InputStream stream =
                    fs.createDocumentInputStream("Workbook");
            Record[] records = createRecords(stream, dump);
        } catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

            {
                viewer.setDump(true);
            }
            if ((args.length > 1) && args[1].equals("bfd"))
            {
                POIFSFileSystem fs =
                        new POIFSFileSystem(new FileInputStream(args[0]));
                InputStream stream =
                        fs.createDocumentInputStream("Workbook");
                int size = stream.available();
                byte[] data = new byte[size];

                stream.read(data);
                HexDump.dump(data, 0, System.out, 0);
View Full Code Here

     *
     */
    public HDFObjectFactory(InputStream istream) throws IOException
    {
        //do Ole stuff
        _filesystem = new POIFSFileSystem(istream);

        DocumentEntry headerProps =
            (DocumentEntry)_filesystem.getRoot().getEntry("WordDocument");

        _mainDocument = new byte[headerProps.getSize()];
View Full Code Here

    public static List getTypes(InputStream istream) throws IOException
    {
        List results = new ArrayList(1);

        //do Ole stuff
        POIFSFileSystem filesystem = new POIFSFileSystem(istream);

        DocumentEntry headerProps =
            (DocumentEntry)filesystem.getRoot().getEntry("WordDocument");

        byte[] mainDocument = new byte[headerProps.getSize()];
        filesystem.createDocumentInputStream("WordDocument").read(mainDocument);

        FileInformationBlock fib = new FileInformationBlock(mainDocument);

       // initTableStream();
       // initTextPieces();
View Full Code Here

public class MuckingAround
{
    public static void main(String[] args)
        throws Exception
    {
        POIFSFileSystem fs      =
                new POIFSFileSystem(new FileInputStream("workbook.xls"));
        HSSFWorkbook wb = new HSSFWorkbook(fs);
        HSSFSheet sheet = wb.getSheetAt(0);
        HSSFRow row = sheet.getRow(0);
        System.out.println(row.getCell((short)0).getDateCellValue());
        System.out.println(row.getCell((short)0).getCellStyle().getDataFormat());
View Full Code Here

TOP

Related Classes of org.apache.poi.poifs.filesystem.POIFSFileSystem$CloseIgnoringInputStream

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.