org.apache.maven.wagon.providers.ssh.knownhost

Class FileKnownHostsProvider

Implemented Interfaces:
KnownHostsProvider

public class FileKnownHostsProvider
extends StreamKnownHostsProvider

Provides known hosts from a file
Author:
Juan F. Codagnone
Since:
Sep 12, 2005

Field Summary

Fields inherited from class org.apache.maven.wagon.providers.ssh.knownhost.AbstractKnownHostsProvider

contents

Fields inherited from interface org.apache.maven.wagon.providers.ssh.knownhost.KnownHostsProvider

ROLE

Constructor Summary

FileKnownHostsProvider()
Creates a FileKnownHostsProvider using as file openssh knwon_host
FileKnownHostsProvider(File file)
Creates the FileKnownHostsProvider.

Method Summary

File
getFile()
void
storeKnownHosts(String contents)

Methods inherited from class org.apache.maven.wagon.providers.ssh.knownhost.AbstractKnownHostsProvider

getContents, getHostKeyChecking, setHostKeyChecking, storeKnownHosts

Constructor Details

FileKnownHostsProvider

public FileKnownHostsProvider()
            throws IOException
Creates a FileKnownHostsProvider using as file openssh knwon_host

FileKnownHostsProvider

public FileKnownHostsProvider(File file)
            throws IOException
Creates the FileKnownHostsProvider.
Parameters:
file - the file that holds the known hosts, in the openssh format

Method Details

getFile

public File getFile()

storeKnownHosts

public void storeKnownHosts(String contents)
            throws IOException
Specified by:
storeKnownHosts in interface KnownHostsProvider
Overrides:
storeKnownHosts in interface AbstractKnownHostsProvider