The File Piper

This project is a GUI utility for processing files in Java. It allows selecting a set of source files and a pipeline of processes to apply onto those files. The applications shows in a nice-looking user interface where you can define profiles for your repetitive tasks. It provides pre-defined processors doing usual file manipulation tasks like: Copy, Head, Tail, Chunk, Search, Replace, Zip, Unzip... But the biggest value of this file processor tool is the ability to add easily custom file processors written in java.

Here is a snapshot of the file piper tool interface (with Nimbus look & feel)

Note: The File Piper is totally stream-based (a file is never loaded completely in memory), so it can easily handle very big files.

Pre-defined processors

The File-Piper provides useful pre-defined file processors:

  • Copy: simply copy of the input to output.
  • Head: Keeping only the X first lines/bytes of a file.
  • Tail: Keeping only the X last lines/bytes of a file.
  • Chunk: chunking a file in pieces of fixed size.
  • Search: global search (like unix "grep" command).
  • Replace: global search & replace.
  • Zip/Unzip: Zip/Unzip all the input files.

    See the user interface description and the commented usage examples to understand how those processors can be used and combined in the File Piper tool.

Pluggable file processors

The biggest value of this file processor tool is the ability to add some custom file processors written in java.

Imagine you have to process a set of files (something like filtering, enhancing text files content or image processing) and you can easily write the java code doing the job for one file. If you want to have an easy-to-use visual tool to process arbitrary file sets, the road is still long.
You will have to provide:

  • A way to define the input file set.
  • A way to define the output file set.
  • A way to provide parameters for your file processor (if needed).
  • If you want to have a user-friendly application, a way to persists the last settings used.
  • Possibly a way to combine simple several file processors (like: filtering + enhancing + zip) .
  • A nice user interface on top of all your classes.
  • A deployable application bundling everything.

This is exactly where the File Piper helps you: Just write your processor class (extending base provided class or implementing a simple interface), register it in the Piper and your done.

See how to create your own file processor and integrate it in the File Piper tool: simple example and example using parameters.

Not supported

What the piper does not:

  • Automatic batch processing: The Piper comes with a graphical user interface, it is not an automation tool. If fully automated file processing is your aim, rather use a java-based make tool like apache-ant.
  • Very high performance: Very high performance is not the aim of this tool. It uses the simplest implementation available for file processing (for example it uses standard I/O classes of java.io) and a fixed number of threads (one per processor). However, the fact that it is totally stream-based ensure that the performance is OK for usual tasks, even with very big files.
  • Internationalization: The Piper has grown as a developer tool and, in my company, all developers are supposed to understand English. So, nothing was planned to have an interface supporting other languages.