Package org.simpleframework.http.resource

Examples of org.simpleframework.http.resource.FileContext


import java.net.InetSocketAddress;

public class SimpleHttpFileServerFactory implements HttpFileServerFactory {

    public HttpFileServer start(File contentRoot, int port) {
        Container container = new SimpleFileServerContainer(new FileContext(contentRoot));

        try {
            final Server server = new ContainerServer(container);
            Connection connection = new SocketConnection(server);
            InetSocketAddress address = new InetSocketAddress(port);
View Full Code Here

TOP

Related Classes of org.simpleframework.http.resource.FileContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.