Top Description Constructors Methods
liquibase.resource

public Class ZipPathHandler

extends AbstractPathHandler
Class Inheritance
Imports
java.io.File, .FileNotFoundException, .IOException, .OutputStream, java.net.URI, java.nio.file.Files, .Path, .Paths, .StandardOpenOption, java.util.Arrays

PathHandler that converts the path into a DirectoryResourceAccessor.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public OutputStream
createResource(String path)

Implements liquibase.resource.PathHandler.createResource.

Creates a new resource at the specified path and returns an OutputStream for writing to it.

public int
getPriority(String root)

Implements liquibase.resource.PathHandler.getPriority.

Returns PRIORITY_SPECIALIZED for all "jar:file:" or files that end in ".jar" or ".zip"

public Resource
getResource(String path)

Implements liquibase.resource.PathHandler.getResource.

Parse the given "absolute" path and return a liquibase.resource.Resource for it if it exists.

public ResourceAccessor
getResourceAccessor(String root)

Implements liquibase.resource.PathHandler.getResourceAccessor.

Parse the given path and return a ResourceAccessor for it.

Constructor Detail

ZipPathHandlerback to summary
public ZipPathHandler()

Method Detail

createResourceback to summary
public OutputStream createResource(String path) throws IOException

Implements liquibase.resource.PathHandler.createResource.

Doc from liquibase.resource.PathHandler.createResource.

Creates a new resource at the specified path and returns an OutputStream for writing to it.

Annotations
@Override
Exceptions
IOException:
if the path cannot be written to
getPriorityback to summary
public int getPriority(String root)

Implements liquibase.resource.PathHandler.getPriority.

Returns PRIORITY_SPECIALIZED for all "jar:file:" or files that end in ".jar" or ".zip"

Annotations
@Override
getResourceback to summary
public Resource getResource(String path) throws IOException

Implements liquibase.resource.PathHandler.getResource.

Doc from liquibase.resource.PathHandler.getResource.

Parse the given "absolute" path and return a liquibase.resource.Resource for it if it exists.

Returns:Resource

a Resource even if the resource does not exist. Callers can check Resource#exists() to determine if it exists or not

Annotations
@Override
Exceptions
IOException:
if the path is invalid
getResourceAccessorback to summary
public ResourceAccessor getResourceAccessor(String root) throws FileNotFoundException

Implements liquibase.resource.PathHandler.getResourceAccessor.

Doc from liquibase.resource.PathHandler.getResourceAccessor.

Parse the given path and return a ResourceAccessor for it.

Annotations
@Override
Exceptions
FileNotFoundException:
if the path is valid but does not exist