]> source.dussan.org Git - poi.git/commitdiff
*** empty log message ***
authorRainer Klute <klute@apache.org>
Thu, 20 Feb 2003 17:51:37 +0000 (17:51 +0000)
committerRainer Klute <klute@apache.org>
Thu, 20 Feb 2003 17:51:37 +0000 (17:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353008 13f79535-47bb-0310-9956-ffa450edef68

src/examples/src/org/apache/poi/hpsf/examples/ReadTitle.java

index fce1bd4c079ef63c0d60290ed38b7532d3e8b729..749d14e843017f228183727a146e5c44612f36d5 100644 (file)
@@ -74,36 +74,36 @@ public class ReadTitle
 
     public static void main(String[] args) throws IOException
     {
-       final String filename = args[0];
-       POIFSReader r = new POIFSReader();
-       r.registerListener(new MyPOIFSReaderListener(),
-                          "\005SummaryInformation");
-       r.read(new FileInputStream(filename));
+        final String filename = args[0];
+        POIFSReader r = new POIFSReader();
+        r.registerListener(new MyPOIFSReaderListener(),
+                           "\005SummaryInformation");
+        r.read(new FileInputStream(filename));
     }
 
 
     static class MyPOIFSReaderListener implements POIFSReaderListener
     {
-       public void processPOIFSReaderEvent(POIFSReaderEvent event)
-       {
-           SummaryInformation si = null;
-           try
-           {
-               si = (SummaryInformation)
-                   PropertySetFactory.create(event.getStream());
-           }
-           catch (Exception ex)
-           {
-               throw new RuntimeException
-                   ("Property set stream \"" +
-                    event.getPath() + event.getName() + "\": " + ex);
-           }
-           final String title = si.getTitle();
-           if (title != null)
-               System.out.println("Title: \"" + title + "\"");
-           else
-               System.out.println("Document has no title.");
-       }
+        public void processPOIFSReaderEvent(POIFSReaderEvent event)
+        {
+            SummaryInformation si = null;
+            try
+            {
+                si = (SummaryInformation)
+                    PropertySetFactory.create(event.getStream());
+            }
+            catch (Exception ex)
+            {
+                throw new RuntimeException
+                    ("Property set stream \"" +
+                     event.getPath() + event.getName() + "\": " + ex);
+            }
+            final String title = si.getTitle();
+            if (title != null)
+                System.out.println("Title: \"" + title + "\"");
+            else
+                System.out.println("Document has no title.");
+        }
     }
 
 }