]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - dav/DavServerHandler.java
1 package org
.argeo
.util
.dav
;
3 import java
.io
.IOException
;
5 import org
.argeo
.util
.http
.HttpMethod
;
7 import com
.sun
.net
.httpserver
.HttpExchange
;
8 import com
.sun
.net
.httpserver
.HttpHandler
;
10 public class DavServerHandler
implements HttpHandler
{
13 public void handle(HttpExchange exchange
) throws IOException
{
14 String method
= exchange
.getRequestMethod();
15 if (DavMethod
.PROPFIND
.name().equals(method
)) {
17 } else if (HttpMethod
.GET
.name().equals(method
)) {
18 exchange
.getResponseBody().write("Hello Dav!".getBytes());
20 throw new IllegalArgumentException("Unsupported method " + method
);
25 protected DavResponse
handlePROPFIND(HttpExchange exchange
) {