Interface NativeBinaryLocator

All Known Implementing Classes:
ZonkyIOPostgresLocator

public interface NativeBinaryLocator
Locates a native binary on the Filesystem. If necessary, it should download the binary first from the network.

Implementations of this class must implement Object.hashCode() and Object.equals(Object) and *should* implement Object.toString().

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a string identifier that represents the archive returned.
    Returns an input stream from which the contents of the binary archive can be read.
  • Field Details

  • Method Details

    • getInputStream

      Returns an input stream from which the contents of the binary archive can be read.
      Returns:
      An input stream. May return null.
      Throws:
      IOException - If the archive could not be located or read.
    • getIdentifier

      Returns a string identifier that represents the archive returned. This identifier should be stable (same value for the same archive), even across multiple JVM invocations. The value must only contain characters that can be used as a legal file name.

      The default implementation needs to read the full archive contents and is relatively slow. Implementations of this interface can override this method to provide a faster way to create a stable identifier based on the specific implementation.

      The default implementation hashes the archive contents and uses it to return a stable file name.

      Returns:
      A stable indentifier that can be used as a file name.
      Throws:
      IOException - If the stream could not be read.