// Create and start a connector instance
Server server = new Server(Protocol.HTTP, 8554, new Restlet() {
@Override
public void handle(Request request, Response response) {
try {
FileRepresentation fr = new FileRepresentation(
"file:///c:/TEST/restlet-jse-2.0.5-ff.zip",
MediaType.APPLICATION_ZIP);
System.out.println("Size sent: " + fr.getSize());
InputRepresentation ir = new InputRepresentation(
fr.getStream(), fr.getMediaType());
response.setEntity(ir);
} catch (IOException e) {
e.printStackTrace();
}
}