KeyView 24.1

# Introduction

The following Java sample programs are provided:

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

The source code for the programs is in the directory `javaapi/sample`. Included alongside the source code are compiled `.class` files, and the following Batch (`.bat`) and C Shell (`.csh`) files that help run the corresponding program:

    FilterFileToFile.bat (.csh)

    FilterStreamToStream.bat (.csh)

    FilterFileToStream.bat (.csh)

    FilterStreamToFile.bat (.csh)

    FilterFileByChunk.bat (.csh)

    FilterStreamByChunk.bat (.csh)

Before the sample code can be compiled, you must replace the placeholder `YOUR_KEYVIEW_LICENSE` in the `Filter` constructor with your license information.

The compiled `.class` files that are supplied in the SDK have an embedded trial license, which expires approximately five months after release. If you set the environment variable `KV_SAMPLE_PROGRAM_LICENSE_FROM_FILEPATH` to a file path, the sample programs read your license from the specified file. This allows you to use the programs after the embedded trial license has expired, and to test or troubleshoot with your own license.

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. OpenText 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.

Copyright 2016-2023 Open Text
Version 24.1 | Last updated December 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.1

Topic Title: Introduction