1 17 package com.sslexplorer.vfs.webdav; 18 19 import java.io.IOException ; 20 21 import com.sslexplorer.vfs.VFSResource; 22 23 30 public class DAVNotModified extends DAVException { 31 32 private VFSResource resource = null; 33 34 37 public DAVNotModified(VFSResource resource) { 38 super(304, "Resource Not Modified"); 39 this.resource = resource; 40 } 41 42 46 public void write(DAVTransaction transaction) 47 throws IOException { 48 transaction.setStatus(this.getStatus()); 49 50 51 String etag = resource.getEntityTag(); 52 String lmod = DAVUtilities.format(resource.getLastModified()); 53 54 55 if (etag != null) transaction.setHeader("ETag", etag); 56 if (lmod != null) transaction.setHeader("Last-Modified", lmod); 57 } 58 } 59 | Popular Tags |