Interface Transport

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DefaultTransport

@Experimental @Consumer public interface Transport extends Closeable
Transport for specified remote repository (using provided remote repository base URI as root). Must be treated as a resource, best in try-with-resource block.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    get(URI relativeSource, Path target)
    GETs the source URI content into target (does not have to exist, or will be overwritten if exist).
    Optional<byte[]>
    getBytes(URI relativeSource)
    GETs the source URI content as byte array.
    default Optional<String>
    getString(URI relativeSource)
    GETs the source URI content as string using UTF8 charset.
    getString(URI relativeSource, Charset charset)
    GETs the source URI content as string.
    void
    put(Path source, URI relativeTarget)
    PUTs the source file (must exist as file) to target URI.
    void
    putBytes(byte[] source, URI relativeTarget)
    PUTs the source byte array to target URI.
    default void
    putString(String source, URI relativeTarget)
    PUTs the source string using UTF8 charset to target URI.
    void
    putString(String source, Charset charset, URI relativeTarget)
    PUTs the source string to target URI.

    Methods inherited from interface java.io.Closeable

    close