Examples of openResourceAsStream()


Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

    * Initialize this test, load up the messages.
    */
   public TestFixedSizedProperties() throws Exception {
       POIDataSamples samples = POIDataSamples.getHSMFInstance();
      this.mapiMessageSucceeds = new MAPIMessage(
                samples.openResourceAsStream(messageSucceeds));
      this.mapiMessageFails = new MAPIMessage(
                samples.openResourceAsStream(messageFails));   
      this.fsMessageSucceeds = new POIFSFileSystem(new FileInputStream(samples.getFile(messageSucceeds)));
      this.fsMessageFails = new POIFSFileSystem(new FileInputStream(samples.getFile(messageFails)));
     
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   public TestFixedSizedProperties() throws Exception {
       POIDataSamples samples = POIDataSamples.getHSMFInstance();
      this.mapiMessageSucceeds = new MAPIMessage(
                samples.openResourceAsStream(messageSucceeds));
      this.mapiMessageFails = new MAPIMessage(
                samples.openResourceAsStream(messageFails));   
      this.fsMessageSucceeds = new POIFSFileSystem(new FileInputStream(samples.getFile(messageSucceeds)));
      this.fsMessageFails = new POIFSFileSystem(new FileInputStream(samples.getFile(messageFails)));
     
      messageDateFormat = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss");
      messageDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   * Excel embeded in excel
   */
  public void testWithEmbededInOwn() throws Exception {
    POIDataSamples ssSamples = POIDataSamples.getSpreadSheetInstance();
    POIFSFileSystem fs = new POIFSFileSystem(
        ssSamples.openResourceAsStream("excel_with_embeded.xls")
    );

    DirectoryNode dirA = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B5");
    DirectoryNode dirB = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B4");

View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

*/
public final class TestSound extends TestCase {
  public void testRealFile() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();

    SlideShow ppt = new SlideShow(slTests.openResourceAsStream("sound.ppt"));

    // Get the document
    Document doc = ppt.getDocumentRecord();
    SoundCollection soundCollection = null;
    Record[] doc_ch = doc.getChildRecords();
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   *
   * @throws Exception
   */
  public TestFileWithAttachmentsRead() throws IOException {
        POIDataSamples samples = POIDataSamples.getHSMFInstance();
    this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("attachment_test_msg.msg"));
  }

  /**
   * Test to see if we can retrieve attachments.
   *
 
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   * Initialize this test, load up the blank.msg mapi message.
   * @throws Exception
   */
  public TestOutlook30FileRead() throws IOException {
        POIDataSamples samples = POIDataSamples.getHSMFInstance();
    this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
  }

  /**
   * Test to see if we can read the CC Chunk.
   * @throws ChunkNotFoundException
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   * Initialize this test, load up the blank.msg mapi message.
   * @throws Exception
   */
  public TestSimpleFileRead() throws IOException {
        POIDataSamples samples = POIDataSamples.getHSMFInstance();
    this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
  }

  /**
   * Test to see if we can read the CC Chunk.
   * @throws ChunkNotFoundException
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

  /**
   * Initialize this test, load up the blank.msg mapi message.
   */
  public TestBlankFileRead() throws IOException {
        POIDataSamples samples = POIDataSamples.getHSMFInstance();
    this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("blank.msg"));
  }

  /**
   * Check if we can read the body of the blank message, we expect "".
   */
 
View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

   * Excel embeded in excel
   */
  public void testWithEmbededInOwn() throws Exception {
        POIDataSamples ssSamples = POIDataSamples.getSpreadSheetInstance();
    POIFSFileSystem fs = new POIFSFileSystem(
                ssSamples.openResourceAsStream("excel_with_embeded.xls")
        );

    DirectoryNode dirA = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B5");
    DirectoryNode dirB = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B4");

View Full Code Here

Examples of org.apache.poi.POIDataSamples.openResourceAsStream()

  // POIFS primed on the test data
  private POIFSFileSystem pfs;

    public TestReWriteSanity() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    pfs = new POIFSFileSystem(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new HSLFSlideShow(pfs);
    }

  public void testUserEditAtomsRight() throws Exception {
    // Write out to a byte array
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.