Package com.stimulus.archiva.exception

Examples of com.stimulus.archiva.exception.ExtractionException


            }
          }
        }
      }
      catch (Exception e) {
          throw new ExtractionException("could not extract Excel document",e,logger);
      } finally {
            if (out != null) {
               out.close();
            }
      }
      try {
          return new FileReader(file);
      } catch(Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      }
  }
View Full Code Here


              writer = new FileWriter(file);
              DefaultStyledDocument doc = new DefaultStyledDocument();
              new RTFEditorKit().read(reader, doc, 0);
              writer.write(doc.getText(0, doc.getLength()));
          } catch (Exception ioe) {
              throw new ExtractionException("failed to parse rtf document", ioe,logger);
          }
          finally {
              if (reader != null) {
                  try {
                      reader.close();
                  } catch (IOException ioe) {}
              }

              if (writer != null) {
                  try {
                      writer.close();
                  } catch (IOException ioe) {}
              }
          }
          try {
            return new FileReader(file);
        } catch(Exception ex) {
            throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
        }
         
      }
View Full Code Here

            tempFiles.markForDeletion(file);
            output = new FileOutputStream(file);
          reader.registerListener(this);
          reader.read(is);
      } catch (Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      finally {
            if (output != null) {
                try {
                    output.close();
                } catch (IOException ioe) {}
            }
        }
      try {
          return new FileReader(file);
      } catch(Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      }
  }
View Full Code Here

       output.close();
       if(document != null)
          document.close();
     
     } catch (Exception e) {
         throw new ExtractionException("failed to extract pdf",e,logger);
     }
     try {
          return new FileReader(file);
     } catch(Exception ex) {
        throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
     }
}
View Full Code Here

     logger.debug("returning stream containing converted word text for search indexing");
     return new InputStreamReader(textin);
     //return new StringReader("shuttle");
   } catch (IOException io) {
     io.printStackTrace();
     throw new ExtractionException("failed to extract text from word document {filename='" + filepath + "'}",io,logger);
   }
   //return new StringReader("");
}
View Full Code Here

            }
          }
        }
      }
      catch (Exception e) {
          throw new ExtractionException("could not extract Excel document",e,logger);
      } finally {
            if (out != null) {
               out.close();
            }
      }
      try {
          return new FileReader(file);
      } catch(Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      }
  }
View Full Code Here

              writer = new FileWriter(file);
              DefaultStyledDocument doc = new DefaultStyledDocument();
              new RTFEditorKit().read(reader, doc, 0);
              writer.write(doc.getText(0, doc.getLength()));
          } catch (Exception ioe) {
              throw new ExtractionException("failed to parse rtf document", ioe,logger);
          }
          finally {
              if (reader != null) {
                  try {
                      reader.close();
                  } catch (IOException ioe) {}
              }

              if (writer != null) {
                  try {
                      writer.close();
                  } catch (IOException ioe) {}
              }
          }
          try {
            return new FileReader(file);
        } catch(Exception ex) {
            throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
        }
         
      }
View Full Code Here

            tempFiles.markForDeletion(file);
            output = new FileOutputStream(file);
          reader.registerListener(this);
          reader.read(is);
      } catch (Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      finally {
            if (output != null) {
                try {
                    output.close();
                } catch (IOException ioe) {}
            }
        }
      try {
          return new FileReader(file);
      } catch(Exception ex) {
          throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
      }
  }
View Full Code Here

       stripper.writeText(document, output);
       output.close();
     
     
     } catch (Exception e) {
         throw new ExtractionException("failed to extract pdf (probable password protected document)",e,logger);
     } finally {
       try {
         if(document != null)
             document.close();
       } catch (IOException io) {}
     }
     try {
          return new FileReader(file);
     } catch(Exception ex) {
        throw new ExtractionException("failed to extract text from powerpoint document",ex,logger);
     }
}
View Full Code Here

     logger.debug("returning stream containing converted word text for search indexing");
     return new InputStreamReader(textin);
     //return new StringReader("shuttle");
   } catch (IOException io) {
     io.printStackTrace();
     throw new ExtractionException("failed to extract text from word document {filename='" + filepath + "'}",io,logger);
   }
   //return new StringReader("");
}
View Full Code Here

TOP

Related Classes of com.stimulus.archiva.exception.ExtractionException

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.