C# 클래스 SharpCifs.Config

This class uses a static Sharpen.Properties to act as a cental repository for all jCIFS configuration properties. It cannot be instantiated. Similar to System properties the namespace is global therefore property names should be unique. Before use, the load method should be called with the name of a Properties file (or null indicating no file) to initialize the Config. The System properties will then populate the Config as well potentially overwriting properties from the file. Thus properties provided on the commandline with the -Dproperty.name=value VM parameter will override properties from the configuration file. There are several ways to set jCIFS properties. See the overview page of the API documentation for details.
파일 보기 프로젝트 열기: brandonprry/Potato

공개 프로퍼티들

프로퍼티 타입 설명
DefaultOemEncoding string
signalHandler System.Threading.AutoResetEvent
signalHandlerClient System.Threading.AutoResetEvent

공개 메소드들

메소드 설명
Get ( string key ) : object

Retrieve a property as an Object.

Retrieve a property as an Object.

GetBoolean ( string key, bool def ) : bool

Retrieve a boolean value.

Retrieve a boolean value. If the property is not found, the value of def is returned.

GetInetAddress ( string key, IPAddress def ) : IPAddress

Retrieve an InetAddress.

Retrieve an InetAddress. If the address is not an IP address and cannot be resolved null will be returned.

GetInetAddressArray ( string key, string delim, IPAddress def ) : System.Net.IPAddress[]

Retrieve an array of InetAddress created from a property value containting a delim separated list of hostnames and/or ipaddresses.

Retrieve an array of InetAddress created from a property value containting a delim separated list of hostnames and/or ipaddresses.

GetInt ( string key ) : int

Retrieve an int.

Retrieve an int. If the property is not found, -1 is returned.

GetInt ( string key, int def ) : int

Retrieve an int.

Retrieve an int. If the key does not exist or cannot be converted to an int, the provided default argument will be returned.

GetLocalHost ( ) : IPAddress
GetLong ( string key, long def ) : long

Retrieve a long.

Retrieve a long. If the key does not exist or cannot be converted to a long, the provided default argument will be returned.

GetProperty ( string key ) : string

Retrieve a String.

Retrieve a String. If the property is not found, null is returned.

GetProperty ( string key, string def ) : string

Retrieve a String.

Retrieve a String. If the key cannot be found, the provided def default parameter will be returned.

Load ( InputStream input ) : void

Load the Config with properties from the stream in from a Properties file.

Load the Config with properties from the stream in from a Properties file.

RegisterSmbURLHandler ( ) : void

This static method registers the SMB URL protocol handler which is required to use SMB URLs with the java.net.URL class.

This static method registers the SMB URL protocol handler which is required to use SMB URLs with the java.net.URL class. If this method is not called before attempting to create an SMB URL with the URL class the following exception will occur:

 Exception MalformedURLException: unknown protocol: smb at java.net.URL.(URL.java:480) at java.net.URL.(URL.java:376) at java.net.URL.(URL.java:330) at jcifs.smb.SmbFile.(SmbFile.java:355) ... 
SetProperties ( Properties prp ) : void

Set the default properties of the static Properties used by Config.

Set the default properties of the static Properties used by Config. This permits a different Properties object/file to be used as the source of properties for use by the jCIFS library. The Properties must be set before jCIFS classes are accessed as most jCIFS classes load properties statically once. Using this method will also override properties loaded using the -Djcifs.properties= commandline parameter.

SetProperty ( string key, string value ) : void

Add a property.

Add a property.

Store ( SharpCifs.Util.Sharpen.OutputStream output, string header ) : void
getNtlmContextFactory ( ) : INtlmContextFactory
setNtlmContextFactory ( INtlmContextFactory factory ) : void

비공개 메소드들

메소드 설명
Config ( ) : System

메소드 상세

Get() 공개 정적인 메소드

Retrieve a property as an Object.
Retrieve a property as an Object.
public static Get ( string key ) : object
key string
리턴 object

GetBoolean() 공개 정적인 메소드

Retrieve a boolean value.
Retrieve a boolean value. If the property is not found, the value of def is returned.
public static GetBoolean ( string key, bool def ) : bool
key string
def bool
리턴 bool

GetInetAddress() 공개 정적인 메소드

Retrieve an InetAddress.
Retrieve an InetAddress. If the address is not an IP address and cannot be resolved null will be returned.
public static GetInetAddress ( string key, IPAddress def ) : IPAddress
key string
def System.Net.IPAddress
리턴 System.Net.IPAddress

GetInetAddressArray() 공개 정적인 메소드

Retrieve an array of InetAddress created from a property value containting a delim separated list of hostnames and/or ipaddresses.
Retrieve an array of InetAddress created from a property value containting a delim separated list of hostnames and/or ipaddresses.
public static GetInetAddressArray ( string key, string delim, IPAddress def ) : System.Net.IPAddress[]
key string
delim string
def System.Net.IPAddress
리턴 System.Net.IPAddress[]

GetInt() 공개 정적인 메소드

Retrieve an int.
Retrieve an int. If the property is not found, -1 is returned.
public static GetInt ( string key ) : int
key string
리턴 int

GetInt() 공개 정적인 메소드

Retrieve an int.
Retrieve an int. If the key does not exist or cannot be converted to an int, the provided default argument will be returned.
public static GetInt ( string key, int def ) : int
key string
def int
리턴 int

GetLocalHost() 공개 정적인 메소드

public static GetLocalHost ( ) : IPAddress
리턴 System.Net.IPAddress

GetLong() 공개 정적인 메소드

Retrieve a long.
Retrieve a long. If the key does not exist or cannot be converted to a long, the provided default argument will be returned.
public static GetLong ( string key, long def ) : long
key string
def long
리턴 long

GetProperty() 공개 정적인 메소드

Retrieve a String.
Retrieve a String. If the property is not found, null is returned.
public static GetProperty ( string key ) : string
key string
리턴 string

GetProperty() 공개 정적인 메소드

Retrieve a String.
Retrieve a String. If the key cannot be found, the provided def default parameter will be returned.
public static GetProperty ( string key, string def ) : string
key string
def string
리턴 string

Load() 공개 정적인 메소드

Load the Config with properties from the stream in from a Properties file.
Load the Config with properties from the stream in from a Properties file.
public static Load ( InputStream input ) : void
input SharpCifs.Util.Sharpen.InputStream
리턴 void

RegisterSmbURLHandler() 공개 정적인 메소드

This static method registers the SMB URL protocol handler which is required to use SMB URLs with the java.net.URL class.
This static method registers the SMB URL protocol handler which is required to use SMB URLs with the java.net.URL class. If this method is not called before attempting to create an SMB URL with the URL class the following exception will occur:
 Exception MalformedURLException: unknown protocol: smb at java.net.URL.(URL.java:480) at java.net.URL.(URL.java:376) at java.net.URL.(URL.java:330) at jcifs.smb.SmbFile.(SmbFile.java:355) ... 
public static RegisterSmbURLHandler ( ) : void
리턴 void

SetProperties() 공개 정적인 메소드

Set the default properties of the static Properties used by Config.
Set the default properties of the static Properties used by Config. This permits a different Properties object/file to be used as the source of properties for use by the jCIFS library. The Properties must be set before jCIFS classes are accessed as most jCIFS classes load properties statically once. Using this method will also override properties loaded using the -Djcifs.properties= commandline parameter.
public static SetProperties ( Properties prp ) : void
prp SharpCifs.Util.Sharpen.Properties
리턴 void

SetProperty() 공개 정적인 메소드

Add a property.
Add a property.
public static SetProperty ( string key, string value ) : void
key string
value string
리턴 void

Store() 공개 정적인 메소드

public static Store ( SharpCifs.Util.Sharpen.OutputStream output, string header ) : void
output SharpCifs.Util.Sharpen.OutputStream
header string
리턴 void

getNtlmContextFactory() 공개 정적인 메소드

public static getNtlmContextFactory ( ) : INtlmContextFactory
리턴 INtlmContextFactory

setNtlmContextFactory() 공개 정적인 메소드

public static setNtlmContextFactory ( INtlmContextFactory factory ) : void
factory INtlmContextFactory
리턴 void

프로퍼티 상세

DefaultOemEncoding 공개적으로 정적으로 프로퍼티

public static string DefaultOemEncoding
리턴 string

signalHandler 공개적으로 정적으로 프로퍼티

public static AutoResetEvent,System.Threading signalHandler
리턴 System.Threading.AutoResetEvent

signalHandlerClient 공개적으로 정적으로 프로퍼티

public static AutoResetEvent,System.Threading signalHandlerClient
리턴 System.Threading.AutoResetEvent