Home

Main
FSP Servers
FSP Software
FSP Downloads

FSP project
FSP Team
Testers needed
Open tasks
Wizards vs CSH

Mailing lists
Bug Tracker

FSP Documents
Purpose
History
Articles
Today
Future
INFO
FAQ Old | New
FSP Protocol
Quotes

FSP suite
Browse Code
Copyright
Changelog
TODO
Open Hub page

Java library
Browse Code
API
READ.ME
Changelog
Open Hub Page

FSP C library
Browse Code
README
NEWS
Changes
TODO
Open Hub page

FSP proxy
Browse Code
READ.ME
Changelog

PyFSP
Browse Code

FSP entry in
GNU dir
Wikipedia

My projects
FSP Client
Download Machine
Smart Cache
SC Loader
Old programs

SF Logo

Java FSP library

Copyright (c) 2003,2004, 2009 by Radim `HSN` Kolar
You may copy or modify this file in any manner you wish, provided
that this notice is always included, and that you hold the author
harmless for any loss or damage resulting from the installation or
use of this software.

What is Java FSP Library

Java FSP library adds support for FSP protocol to Java platform. It can be used system-wide or application wide. Library needs FSPD Version 2.8.1b18 or better and supports IOStreams and functions for read and write access. This library supports both client and server method of FSP packet checksum.

<dependency>
  <groupId>net.sf.fsp</groupId>
  <artifactId>fsplib</artifactId>
  <version>1.0.0-RC11</version>
</dependency>

Using java.net.URL API

You can use standard java.net.URL API family to access files on fsp servers by using fsp://host[:port]/path URL syntax. Java FSP library needs to be registered into java.net.URL subsystem first:

Application wide installation

Just add one line of code to your application:

  java.net.URL.setURLStreamHandlerFactory(new net.sf.fsp.fsp.Handler());

System wide installation

Read API documentation for java.net.URL class. You need to set value of system property java.protocol.handler.pkgs to net.sf.fsp and install net.sf.fsp package into your CLASSPATH or install provided jar file into Java system directory.

Using FSP util API

You can also use class net.sf.fsp.fsplib.FSPutil which has similar API to FSP protocol suite util library.

Using IOStreams

Last way how to move files from/to FSP server is to use FSPInput/OutputStreams. You need to create FSPsession first. See Javadoc API for details.

Download

For download see FSP download page.