## org.das2.util.filesystem.WebProtocol

template for web-based protocols to implement FileSystems

## META_EXIST

## META_COOKIE

## META_LAST_MODIFIED

## META_CONTENT_LENGTH

## META_CONTENT_TYPE

## META_ETAG

## HTTP_RESPONSE_CODE

kludge in place where the response code (200,302,401,etc) can be stored.

## getInputStream

getInputStream( org.das2.util.filesystem.WebFileObject fo, ProgressMonitor mon ) → java.io.InputStream

get an inputStream for the resource. The client using the stream must make sure the stream is closed.

### Parameters

fo - the resource
mon - monitor for the stream.

### Returns:

the stream
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMetadata

getMetadata( org.das2.util.filesystem.WebFileObject fo ) → java.util.Map

return metadata for the resource. This should include:

- WebProtocol.META_EXIST, "true" or "false"
- WebProtocol.META_LAST_MODIFIED, String.valueOf( fo.localFile.lastModified() )
- WebProtocol.META_CONTENT_LENGTH, String.valueOf( fo.localFile.length() )
- WebProtocol.META_CONTENT_TYPE, Files.probeContentType( fo.localFile.toPath() ) )

### Parameters

fo - the resource

### Returns:

a java.util.Map
[search for examples] [view on GitHub] [view on old javadoc] [view source]