Top Description Inners Fields Constructors Methods
jnr.netdb

pack-priv final Class FileServicesDB

extends Object
implements ServicesDB
Class Inheritance
All Implemented Interfaces
jnr.netdb.ServicesDB
Imports
java.io.File, .FileNotFoundException, .FileReader, .IOException, .StringReader, java.util.Collection, .Collections, .LinkedList, .List

Parses /etc/services

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface
private static class

Field Summary

Modifier and TypeField and Description
public static String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Collection<Service>
public static final ServicesDB
public Service
public Service
private static final ServicesDB
load()

private final Service
private static final Service
pack-priv static final NetDBParser
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileNameback to summary
public static String fileName

Constructor Detail

FileServicesDBback to summary
pack-priv FileServicesDB()

Method Detail

getAllServicesback to summary
public Collection<Service> getAllServices()

Implements jnr.netdb.ServicesDB.getAllServices.

getInstanceback to summary
public static final ServicesDB getInstance()
getServiceByNameback to summary
public Service getServiceByName(final String name, final String proto)

Implements jnr.netdb.ServicesDB.getServiceByName.

getServiceByPortback to summary
public Service getServiceByPort(final Integer port, final String proto)

Implements jnr.netdb.ServicesDB.getServiceByPort.

loadback to summary
private static final ServicesDB load()
parseback to summary
private final Service parse(FileServicesDB.Filter filter)
parseServicesEntryback to summary
private static final Service parseServicesEntry(NetDBEntry e)
parseServicesFileback to summary
pack-priv static final NetDBParser parseServicesFile()
jnr.netdb back to summary

private Interface FileServicesDB.Filter


Method Summary

Modifier and TypeMethod and Description
public boolean

Method Detail

filterback to summary
public boolean filter(Service s)
jnr.netdb back to summary

private final Class FileServicesDB.SingletonHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ServicesDB

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final ServicesDB INSTANCE

Constructor Detail

SingletonHolderback to summary
private SingletonHolder()