# Introduction

The following Java sample programs are provided:

- ExtractFilter
- FilterFileByChunk
- FilterFileToFile
- FilterFileToStream
- FilterStreamByChunk
- FilterStreamToFile
- FilterStreamToStream
- FilterTest

The source code for each program is in the directory `install\javaapi\sample`, where `install` is the path name of the Filter installation directory.

In addition to the sample programs, the following batch and C shell files that run each program are also provided:

    FilterFileToFile.bat(.csh)

    FilterStreamToStream.bat (.csh)

    FilterFileToStream.bat (.csh)

    FilterStreamToFile.bat (.csh)

    FilterFileByChunk.bat (.csh)

    FilterStreamByChunk.bat (.csh)

NOTE: The `ExtractFilter` and `FilterTest` sample programs do not use batch or C shell files.

NOTE: The sample programs that demonstrate the use of an input stream show filtering from a `java.io.InputStream` object. In KeyView version 12.9 and later, the stream methods are overloaded to allow you to pass a `com.verity.api.SeekableInputStream` implementation into KeyView. Micro Focus recommends this option, as it allows KeyView to seek about in the file, only reading the parts it needs to read.

If you do need to use a Java InputStream, and you know the stream length, using the method overload that passes in the size might allow KeyView to avoid caching the whole file.

_FT_HTML5_bannerTitle.htm