xmlBlaster 2.2.0 contributions API

org.xmlBlaster.contrib.filewatcher
Class DirectoryManager

java.lang.Object
  extended by org.xmlBlaster.contrib.filewatcher.DirectoryManager

public class DirectoryManager
extends java.lang.Object

DirectoryManager

Author:
Michele Laghi

Constructor Summary
DirectoryManager(org.xmlBlaster.util.Global global, java.lang.String name, java.lang.String directoryName, java.lang.String subDir, long delaySinceLastFileChange, java.lang.String filter, java.lang.String sent, java.lang.String discarded, java.lang.String lockExtention, boolean trueRegex, boolean copyOnMove)
           
 
Method Summary
 java.lang.String[] getAllSubDirs()
          Returns null if no subdirectory found.
 byte[] getContent(FileInfo info)
          Gets the content from the specified file as a byte[].
 java.io.FileInputStream getContentStream(FileInfo info)
           
 java.lang.String getString()
           
 java.lang.String getSubDir()
           
static boolean isFileNameCasesensitive()
           
static void main(java.lang.String[] args)
          java org.xmlBlaster.contrib.filewatcher.DirectoryManager -path /tmp/filewatcher -filter "*.xml" -filterType simple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryManager

public DirectoryManager(org.xmlBlaster.util.Global global,
                        java.lang.String name,
                        java.lang.String directoryName,
                        java.lang.String subDir,
                        long delaySinceLastFileChange,
                        java.lang.String filter,
                        java.lang.String sent,
                        java.lang.String discarded,
                        java.lang.String lockExtention,
                        boolean trueRegex,
                        boolean copyOnMove)
                 throws org.xmlBlaster.util.XmlBlasterException
Throws:
org.xmlBlaster.util.XmlBlasterException
Method Detail

getAllSubDirs

public java.lang.String[] getAllSubDirs()
Returns null if no subdirectory found.

Returns:

isFileNameCasesensitive

public static boolean isFileNameCasesensitive()

getContentStream

public java.io.FileInputStream getContentStream(FileInfo info)
                                         throws org.xmlBlaster.util.XmlBlasterException
Throws:
org.xmlBlaster.util.XmlBlasterException

getContent

public byte[] getContent(FileInfo info)
                  throws org.xmlBlaster.util.XmlBlasterException
Gets the content from the specified file as a byte[]. If this is not possible it will throw an exception.

Parameters:
info -
Returns:
Throws:
org.xmlBlaster.util.XmlBlasterException

getSubDir

public java.lang.String getSubDir()

main

public static void main(java.lang.String[] args)
java org.xmlBlaster.contrib.filewatcher.DirectoryManager -path /tmp/filewatcher -filter "*.xml" -filterType simple


getString

public java.lang.String getString()

xmlBlaster 2.2.0 contributions API

Copyright © 1999-2014 The xmlBlaster.org contributers.