repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
sagiegurari/fax4j
src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java
AdapterFaxClientSpi.validateCondition
protected boolean validateCondition(String key,String value) { boolean valid=false; FaxClientSpiConfigurationConstants condition=FaxClientSpiConfigurationConstants.getEnum(key); String propertyValue=null; switch(condition) { case PROPERTY_CONDITION: ...
java
protected boolean validateCondition(String key,String value) { boolean valid=false; FaxClientSpiConfigurationConstants condition=FaxClientSpiConfigurationConstants.getEnum(key); String propertyValue=null; switch(condition) { case PROPERTY_CONDITION: ...
[ "protected", "boolean", "validateCondition", "(", "String", "key", ",", "String", "value", ")", "{", "boolean", "valid", "=", "false", ";", "FaxClientSpiConfigurationConstants", "condition", "=", "FaxClientSpiConfigurationConstants", ".", "getEnum", "(", "key", ")", ...
Validates the SPI condition. @param key The condition key <br> property - checks a fax4j property is defined and contains a value<br> OS - checks OS name contains the value (case insensitive)<br> java-class - checks that java class can be loaded<br> native-lib - checks that native lib can be loaded<br> executable - ...
[ "Validates", "the", "SPI", "condition", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java#L359-L452
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java
AdapterFaxClientSpi.createFaxClientSpi
protected void createFaxClientSpi(String type) { //setup fax client SPI configuration Properties configuration=this.createFaxClientSpiConfiguration(); //create fax client SPI this.faxClientSpi=FaxClientSpiFactory.createChildFaxClientSpi(type,configuration); }
java
protected void createFaxClientSpi(String type) { //setup fax client SPI configuration Properties configuration=this.createFaxClientSpiConfiguration(); //create fax client SPI this.faxClientSpi=FaxClientSpiFactory.createChildFaxClientSpi(type,configuration); }
[ "protected", "void", "createFaxClientSpi", "(", "String", "type", ")", "{", "//setup fax client SPI configuration", "Properties", "configuration", "=", "this", ".", "createFaxClientSpiConfiguration", "(", ")", ";", "//create fax client SPI", "this", ".", "faxClientSpi", "...
This function creates a new fax client SPI based on the provided configuration. @param type The fax client type
[ "This", "function", "creates", "a", "new", "fax", "client", "SPI", "based", "on", "the", "provided", "configuration", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java#L460-L467
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java
AdapterFaxClientSpi.createFaxClientSpiConfiguration
protected Properties createFaxClientSpiConfiguration() { //get configuration Map<String,String> configuration=this.getConfiguration(); //create new configuration Properties internalSPIConfiguration=new Properties(); Properties overrideConfiguration=new Properties(); ...
java
protected Properties createFaxClientSpiConfiguration() { //get configuration Map<String,String> configuration=this.getConfiguration(); //create new configuration Properties internalSPIConfiguration=new Properties(); Properties overrideConfiguration=new Properties(); ...
[ "protected", "Properties", "createFaxClientSpiConfiguration", "(", ")", "{", "//get configuration", "Map", "<", "String", ",", "String", ">", "configuration", "=", "this", ".", "getConfiguration", "(", ")", ";", "//create new configuration", "Properties", "internalSPICo...
This function creates and returns the internal fax client SPI configuration. @return The internal fax client SPI configuration
[ "This", "function", "creates", "and", "returns", "the", "internal", "fax", "client", "SPI", "configuration", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/adapter/AdapterFaxClientSpi.java#L475-L521
train
hivemq/hivemq-spi
src/main/java/com/hivemq/spi/util/DefaultSslEngineUtil.java
DefaultSslEngineUtil.getSupportedCipherSuites
@ReadOnly public List<String> getSupportedCipherSuites() throws SslException { try { final SSLEngine engine = getDefaultSslEngine(); return ImmutableList.copyOf(engine.getSupportedCipherSuites()); } catch (NoSuchAlgorithmException | KeyManagementException e) { ...
java
@ReadOnly public List<String> getSupportedCipherSuites() throws SslException { try { final SSLEngine engine = getDefaultSslEngine(); return ImmutableList.copyOf(engine.getSupportedCipherSuites()); } catch (NoSuchAlgorithmException | KeyManagementException e) { ...
[ "@", "ReadOnly", "public", "List", "<", "String", ">", "getSupportedCipherSuites", "(", ")", "throws", "SslException", "{", "try", "{", "final", "SSLEngine", "engine", "=", "getDefaultSslEngine", "(", ")", ";", "return", "ImmutableList", ".", "copyOf", "(", "e...
Returns a list of all supported Cipher Suites of the JVM. @return a list of all supported cipher suites of the JVM @throws SslException
[ "Returns", "a", "list", "of", "all", "supported", "Cipher", "Suites", "of", "the", "JVM", "." ]
55fa89ccb081ad5b6d46eaca02179272148e64ed
https://github.com/hivemq/hivemq-spi/blob/55fa89ccb081ad5b6d46eaca02179272148e64ed/src/main/java/com/hivemq/spi/util/DefaultSslEngineUtil.java#L43-L54
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/MailConnectionFactoryImpl.java
MailConnectionFactoryImpl.createTransport
protected Transport createTransport(Session session) { Transport transport=null; try { //get the transport transport=session.getTransport(this.transportProtocol); //connect if(this.transportPort>0) { transport.conne...
java
protected Transport createTransport(Session session) { Transport transport=null; try { //get the transport transport=session.getTransport(this.transportProtocol); //connect if(this.transportPort>0) { transport.conne...
[ "protected", "Transport", "createTransport", "(", "Session", "session", ")", "{", "Transport", "transport", "=", "null", ";", "try", "{", "//get the transport", "transport", "=", "session", ".", "getTransport", "(", "this", ".", "transportProtocol", ")", ";", "/...
This function returns a transport for the provided session. @param session The mail session @return The mail transport
[ "This", "function", "returns", "a", "transport", "for", "the", "provided", "session", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/MailConnectionFactoryImpl.java#L59-L83
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.getFax4jInternalTemporaryDirectoryImpl
private static File getFax4jInternalTemporaryDirectoryImpl() { File temporaryFile=null; try { //create temporary file temporaryFile=File.createTempFile("temp_",".temp"); } catch(IOException exception) { throw new FaxException("Unabl...
java
private static File getFax4jInternalTemporaryDirectoryImpl() { File temporaryFile=null; try { //create temporary file temporaryFile=File.createTempFile("temp_",".temp"); } catch(IOException exception) { throw new FaxException("Unabl...
[ "private", "static", "File", "getFax4jInternalTemporaryDirectoryImpl", "(", ")", "{", "File", "temporaryFile", "=", "null", ";", "try", "{", "//create temporary file", "temporaryFile", "=", "File", ".", "createTempFile", "(", "\"temp_\"", ",", "\".temp\"", ")", ";",...
This function returns the fax4j library internal temporary directory. @return The fax4j library internal temporary directory
[ "This", "function", "returns", "the", "fax4j", "library", "internal", "temporary", "directory", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L61-L103
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.getEncodingToUse
private static String getEncodingToUse(String encoding) { //get encoding String updatedEncoding=encoding; if(updatedEncoding==null) { updatedEncoding=IOHelper.getDefaultEncoding(); } return updatedEncoding; }
java
private static String getEncodingToUse(String encoding) { //get encoding String updatedEncoding=encoding; if(updatedEncoding==null) { updatedEncoding=IOHelper.getDefaultEncoding(); } return updatedEncoding; }
[ "private", "static", "String", "getEncodingToUse", "(", "String", "encoding", ")", "{", "//get encoding", "String", "updatedEncoding", "=", "encoding", ";", "if", "(", "updatedEncoding", "==", "null", ")", "{", "updatedEncoding", "=", "IOHelper", ".", "getDefaultE...
This function returns the encoding to use. If provided encoding is null, the default system encoding is returend. @param encoding The encoding (may be null for system default encoding) @return The encoding to use
[ "This", "function", "returns", "the", "encoding", "to", "use", ".", "If", "provided", "encoding", "is", "null", "the", "default", "system", "encoding", "is", "returend", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L113-L123
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.convertStringToBinary
public static byte[] convertStringToBinary(String text,String encoding) { byte[] data=null; if(text!=null) { if(text.length()==0) { data=new byte[0]; } else { //get logger LoggerManage...
java
public static byte[] convertStringToBinary(String text,String encoding) { byte[] data=null; if(text!=null) { if(text.length()==0) { data=new byte[0]; } else { //get logger LoggerManage...
[ "public", "static", "byte", "[", "]", "convertStringToBinary", "(", "String", "text", ",", "String", "encoding", ")", "{", "byte", "[", "]", "data", "=", "null", ";", "if", "(", "text", "!=", "null", ")", "{", "if", "(", "text", ".", "length", "(", ...
This function converts the provided string to binary data. @param text The text to convert @param encoding The text encoding @return The binary data
[ "This", "function", "converts", "the", "provided", "string", "to", "binary", "data", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L154-L201
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.createReader
public static Reader createReader(InputStream inputStream,String encoding) { //get encoding String updatedEncoding=IOHelper.getEncodingToUse(encoding); //create reader Reader reader=null; try { reader=new InputStreamReader(inputStream,updatedEncod...
java
public static Reader createReader(InputStream inputStream,String encoding) { //get encoding String updatedEncoding=IOHelper.getEncodingToUse(encoding); //create reader Reader reader=null; try { reader=new InputStreamReader(inputStream,updatedEncod...
[ "public", "static", "Reader", "createReader", "(", "InputStream", "inputStream", ",", "String", "encoding", ")", "{", "//get encoding", "String", "updatedEncoding", "=", "IOHelper", ".", "getEncodingToUse", "(", "encoding", ")", ";", "//create reader", "Reader", "re...
This function creates and returns a new reader for the provided input stream. @param inputStream The input stream @param encoding The encoding used by the reader (null for default system encoding) @return The reader
[ "This", "function", "creates", "and", "returns", "a", "new", "reader", "for", "the", "provided", "input", "stream", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L235-L252
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.createWriter
public static Writer createWriter(OutputStream outputStream,String encoding) { //get encoding String updatedEncoding=IOHelper.getEncodingToUse(encoding); //create writer Writer writer=null; try { writer=new OutputStreamWriter(outputStream,updatedE...
java
public static Writer createWriter(OutputStream outputStream,String encoding) { //get encoding String updatedEncoding=IOHelper.getEncodingToUse(encoding); //create writer Writer writer=null; try { writer=new OutputStreamWriter(outputStream,updatedE...
[ "public", "static", "Writer", "createWriter", "(", "OutputStream", "outputStream", ",", "String", "encoding", ")", "{", "//get encoding", "String", "updatedEncoding", "=", "IOHelper", ".", "getEncodingToUse", "(", "encoding", ")", ";", "//create writer", "Writer", "...
This function creates and returns a new writer for the provided output stream. @param outputStream The output stream @param encoding The encoding used by the writer (null for default system encoding) @return The writer
[ "This", "function", "creates", "and", "returns", "a", "new", "writer", "for", "the", "provided", "output", "stream", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L264-L281
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readTextStream
public static String readTextStream(Reader reader) throws IOException { char[] buffer=new char[5000]; Writer stringWriter=new StringWriter(); int read=-1; try { do { //read next buffer read=reader.read(buffer); ...
java
public static String readTextStream(Reader reader) throws IOException { char[] buffer=new char[5000]; Writer stringWriter=new StringWriter(); int read=-1; try { do { //read next buffer read=reader.read(buffer); ...
[ "public", "static", "String", "readTextStream", "(", "Reader", "reader", ")", "throws", "IOException", "{", "char", "[", "]", "buffer", "=", "new", "char", "[", "5000", "]", ";", "Writer", "stringWriter", "=", "new", "StringWriter", "(", ")", ";", "int", ...
Reads the text from the stream. @param reader The reader to the text @return The text read from the provided stream @throws IOException Any IO exception
[ "Reads", "the", "text", "from", "the", "stream", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L292-L321
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readTextFile
public static String readTextFile(File file) throws IOException { //create reader to file (with default encoding) InputStream inputStream=new FileInputStream(file); Reader reader=IOHelper.createReader(inputStream,null); //read text String text=IOHelper.readTextStream(reader)...
java
public static String readTextFile(File file) throws IOException { //create reader to file (with default encoding) InputStream inputStream=new FileInputStream(file); Reader reader=IOHelper.createReader(inputStream,null); //read text String text=IOHelper.readTextStream(reader)...
[ "public", "static", "String", "readTextFile", "(", "File", "file", ")", "throws", "IOException", "{", "//create reader to file (with default encoding)", "InputStream", "inputStream", "=", "new", "FileInputStream", "(", "file", ")", ";", "Reader", "reader", "=", "IOHel...
Reads the text from the file. @param file The text file @return The text read from the provided file @throws IOException Any IO exception
[ "Reads", "the", "text", "from", "the", "file", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L332-L342
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.writeTextFile
public static void writeTextFile(String text,File file) throws IOException { Writer writer=null; try { //create writer to file (with default encoding) OutputStream outputStream=new FileOutputStream(file); writer=IOHelper.createWriter(outputStream,null); ...
java
public static void writeTextFile(String text,File file) throws IOException { Writer writer=null; try { //create writer to file (with default encoding) OutputStream outputStream=new FileOutputStream(file); writer=IOHelper.createWriter(outputStream,null); ...
[ "public", "static", "void", "writeTextFile", "(", "String", "text", ",", "File", "file", ")", "throws", "IOException", "{", "Writer", "writer", "=", "null", ";", "try", "{", "//create writer to file (with default encoding)", "OutputStream", "outputStream", "=", "new...
Writes the text to the file. @param text The text to write to the provided file @param file The text file @throws IOException Any IO exception
[ "Writes", "the", "text", "to", "the", "file", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L354-L371
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readAndWriteStreams
public static void readAndWriteStreams(InputStream inputStream,OutputStream outputStream) throws IOException { byte[] buffer=new byte[5000]; int read=-1; try { do { //read next buffer read=inputStream.read(buffer); ...
java
public static void readAndWriteStreams(InputStream inputStream,OutputStream outputStream) throws IOException { byte[] buffer=new byte[5000]; int read=-1; try { do { //read next buffer read=inputStream.read(buffer); ...
[ "public", "static", "void", "readAndWriteStreams", "(", "InputStream", "inputStream", ",", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "5000", "]", ";", "int", "read", "=", "-", "1",...
Reads the data from the input stream and writes to the output stream. @param inputStream The inputStream to read from @param outputStream The output stream to write to @throws IOException Any IO exception
[ "Reads", "the", "data", "from", "the", "input", "stream", "and", "writes", "to", "the", "output", "stream", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L384-L408
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readStream
public static byte[] readStream(InputStream inputStream) throws IOException { //create output stream ByteArrayOutputStream outputStream=new ByteArrayOutputStream(5000); //read/write IOHelper.readAndWriteStreams(inputStream,outputStream); //get data b...
java
public static byte[] readStream(InputStream inputStream) throws IOException { //create output stream ByteArrayOutputStream outputStream=new ByteArrayOutputStream(5000); //read/write IOHelper.readAndWriteStreams(inputStream,outputStream); //get data b...
[ "public", "static", "byte", "[", "]", "readStream", "(", "InputStream", "inputStream", ")", "throws", "IOException", "{", "//create output stream", "ByteArrayOutputStream", "outputStream", "=", "new", "ByteArrayOutputStream", "(", "5000", ")", ";", "//read/write", "IO...
Reads the data from the stream. @param inputStream The inputStream @return The data read from the provided stream @throws IOException Any IO exception
[ "Reads", "the", "data", "from", "the", "stream", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L419-L431
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readFile
public static byte[] readFile(File file) throws IOException { //create stream to file InputStream inputStream=new FileInputStream(file); //read data byte[] data=IOHelper.readStream(inputStream); return data; }
java
public static byte[] readFile(File file) throws IOException { //create stream to file InputStream inputStream=new FileInputStream(file); //read data byte[] data=IOHelper.readStream(inputStream); return data; }
[ "public", "static", "byte", "[", "]", "readFile", "(", "File", "file", ")", "throws", "IOException", "{", "//create stream to file", "InputStream", "inputStream", "=", "new", "FileInputStream", "(", "file", ")", ";", "//read data", "byte", "[", "]", "data", "=...
Reads the data from the file. @param file The file @return The data read from the provided file @throws IOException Any IO exception
[ "Reads", "the", "data", "from", "the", "file", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L442-L451
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.writeFile
public static void writeFile(byte[] content,File file) throws IOException { OutputStream outputStream=null; try { //create output stream to file outputStream=new FileOutputStream(file); //write to file outputStream.write(content); ...
java
public static void writeFile(byte[] content,File file) throws IOException { OutputStream outputStream=null; try { //create output stream to file outputStream=new FileOutputStream(file); //write to file outputStream.write(content); ...
[ "public", "static", "void", "writeFile", "(", "byte", "[", "]", "content", ",", "File", "file", ")", "throws", "IOException", "{", "OutputStream", "outputStream", "=", "null", ";", "try", "{", "//create output stream to file", "outputStream", "=", "new", "FileOu...
Writes the content to the file. @param content The content to write to the provided file @param file The target file @throws IOException Any IO exception
[ "Writes", "the", "content", "to", "the", "file", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L463-L479
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.getFileFromPathList
public static File getFileFromPathList(String fileNameWithNoPath,String[] pathList) { File foundFile=null; if(pathList!=null) { //get amount int amount=pathList.length; String directoryPath=null; File file=null; for(int...
java
public static File getFileFromPathList(String fileNameWithNoPath,String[] pathList) { File foundFile=null; if(pathList!=null) { //get amount int amount=pathList.length; String directoryPath=null; File file=null; for(int...
[ "public", "static", "File", "getFileFromPathList", "(", "String", "fileNameWithNoPath", ",", "String", "[", "]", "pathList", ")", "{", "File", "foundFile", "=", "null", ";", "if", "(", "pathList", "!=", "null", ")", "{", "//get amount", "int", "amount", "=",...
This function returns the file object of the first location in which the requested file is found. @param fileNameWithNoPath The file name (with no directory path) @param pathList The path list @return The file object if found, else null will be returned
[ "This", "function", "returns", "the", "file", "object", "of", "the", "first", "location", "in", "which", "the", "requested", "file", "is", "found", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L491-L518
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.getFileFromNativePath
public static File getFileFromNativePath(String fileNameWithNoPath) { //get system path String systemPath=System.getProperty("java.library.path"); String pathSeperator=System.getProperty("path.separator"); String[] systemPathElements=systemPath.split(pathSeperator); ...
java
public static File getFileFromNativePath(String fileNameWithNoPath) { //get system path String systemPath=System.getProperty("java.library.path"); String pathSeperator=System.getProperty("path.separator"); String[] systemPathElements=systemPath.split(pathSeperator); ...
[ "public", "static", "File", "getFileFromNativePath", "(", "String", "fileNameWithNoPath", ")", "{", "//get system path", "String", "systemPath", "=", "System", ".", "getProperty", "(", "\"java.library.path\"", ")", ";", "String", "pathSeperator", "=", "System", ".", ...
This function returns the file object of the first location in which the requested file is found. The path list used, is the current native path of the process. @param fileNameWithNoPath The file name (with no directory path) @return The file object if found, else null will be returned
[ "This", "function", "returns", "the", "file", "object", "of", "the", "first", "location", "in", "which", "the", "requested", "file", "is", "found", ".", "The", "path", "list", "used", "is", "the", "current", "native", "path", "of", "the", "process", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L529-L540
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/AbstractContextFaxBridge.java
AbstractContextFaxBridge.submitFaxJob
public FaxJob submitFaxJob(T inputData) { if(inputData==null) { throw new FaxException("Input data not provided."); } //create fax job FaxJob faxJob=this.createFaxJob(); //update fax job info this.requestParser.updateFaxJobFromInp...
java
public FaxJob submitFaxJob(T inputData) { if(inputData==null) { throw new FaxException("Input data not provided."); } //create fax job FaxJob faxJob=this.createFaxJob(); //update fax job info this.requestParser.updateFaxJobFromInp...
[ "public", "FaxJob", "submitFaxJob", "(", "T", "inputData", ")", "{", "if", "(", "inputData", "==", "null", ")", "{", "throw", "new", "FaxException", "(", "\"Input data not provided.\"", ")", ";", "}", "//create fax job", "FaxJob", "faxJob", "=", "this", ".", ...
This function will submit a new fax job. @param inputData The input data holding the fax job information @return The submitted fax job
[ "This", "function", "will", "submit", "a", "new", "fax", "job", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/AbstractContextFaxBridge.java#L70-L94
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/email/DefaultMailMessageParser.java
DefaultMailMessageParser.getTargetAddress
protected String getTargetAddress(Message mailMessage) throws MessagingException { //by default the target address is taken from the mail subject which //is expected to be in the format of: fax:<number> String subject=mailMessage.getSubject(); String targetAddress=null; if((s...
java
protected String getTargetAddress(Message mailMessage) throws MessagingException { //by default the target address is taken from the mail subject which //is expected to be in the format of: fax:<number> String subject=mailMessage.getSubject(); String targetAddress=null; if((s...
[ "protected", "String", "getTargetAddress", "(", "Message", "mailMessage", ")", "throws", "MessagingException", "{", "//by default the target address is taken from the mail subject which", "//is expected to be in the format of: fax:<number>", "String", "subject", "=", "mailMessage", "...
Returns the target address from the provided mail object. @param mailMessage The mail message with the fax data @return The target address @throws MessagingException Any exception while handling the mail message
[ "Returns", "the", "target", "address", "from", "the", "provided", "mail", "object", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/email/DefaultMailMessageParser.java#L123-L135
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/email/DefaultMailMessageParser.java
DefaultMailMessageParser.getSenderEmail
protected String getSenderEmail(Message mailMessage) throws MessagingException { Address[] addresses=mailMessage.getFrom(); String senderEmail=null; if((addresses!=null)&&(addresses.length>0)) { //get sender mail address (only first from is used) Address addre...
java
protected String getSenderEmail(Message mailMessage) throws MessagingException { Address[] addresses=mailMessage.getFrom(); String senderEmail=null; if((addresses!=null)&&(addresses.length>0)) { //get sender mail address (only first from is used) Address addre...
[ "protected", "String", "getSenderEmail", "(", "Message", "mailMessage", ")", "throws", "MessagingException", "{", "Address", "[", "]", "addresses", "=", "mailMessage", ".", "getFrom", "(", ")", ";", "String", "senderEmail", "=", "null", ";", "if", "(", "(", ...
Returns the sender email from the provided mail object. @param mailMessage The mail message with the fax data @return The sender email @throws MessagingException Any exception while handling the mail message
[ "Returns", "the", "sender", "email", "from", "the", "provided", "mail", "object", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/email/DefaultMailMessageParser.java#L146-L160
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java
MultiPartFaxJob2HTTPRequestConverter.initializeAdditionalParameters
protected Map<String,String> initializeAdditionalParameters() { //get configuration Map<String,String> configuration=this.getConfiguration(); //get property part String propertyPart=this.getPropertyPart(); //get prefix String prefix=FaxJob2HTTPRequestConvert...
java
protected Map<String,String> initializeAdditionalParameters() { //get configuration Map<String,String> configuration=this.getConfiguration(); //get property part String propertyPart=this.getPropertyPart(); //get prefix String prefix=FaxJob2HTTPRequestConvert...
[ "protected", "Map", "<", "String", ",", "String", ">", "initializeAdditionalParameters", "(", ")", "{", "//get configuration", "Map", "<", "String", ",", "String", ">", "configuration", "=", "this", ".", "getConfiguration", "(", ")", ";", "//get property part", ...
This function builds and returns the additional parameters map. @return The additional parameters
[ "This", "function", "builds", "and", "returns", "the", "additional", "parameters", "map", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java#L320-L379
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java
MultiPartFaxJob2HTTPRequestConverter.createCommonHTTPRequest
protected HTTPRequest createCommonHTTPRequest(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType) { //setup common request data HTTPRequest httpRequest=new HTTPRequest(); String resource=faxClientSpi.getHTTPResource(faxActionType); httpRequest.setResource(resource); St...
java
protected HTTPRequest createCommonHTTPRequest(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType) { //setup common request data HTTPRequest httpRequest=new HTTPRequest(); String resource=faxClientSpi.getHTTPResource(faxActionType); httpRequest.setResource(resource); St...
[ "protected", "HTTPRequest", "createCommonHTTPRequest", "(", "HTTPFaxClientSpi", "faxClientSpi", ",", "FaxActionType", "faxActionType", ")", "{", "//setup common request data", "HTTPRequest", "httpRequest", "=", "new", "HTTPRequest", "(", ")", ";", "String", "resource", "=...
Creates a HTTP request with the common data. @param faxClientSpi The HTTP fax client SPI @param faxActionType The fax action type @return The HTTP request to send
[ "Creates", "a", "HTTP", "request", "with", "the", "common", "data", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java#L470-L480
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java
MultiPartFaxJob2HTTPRequestConverter.addContentPart
protected final void addContentPart(List<ContentPart<?>> contentList,String key,String value) { if((key!=null)&&(value!=null)&&(value.length()>0)) { if(this.shouldAddContentPart(key)) { contentList.add(new ContentPart<String>(key,value,ContentPartType.STRING))...
java
protected final void addContentPart(List<ContentPart<?>> contentList,String key,String value) { if((key!=null)&&(value!=null)&&(value.length()>0)) { if(this.shouldAddContentPart(key)) { contentList.add(new ContentPart<String>(key,value,ContentPartType.STRING))...
[ "protected", "final", "void", "addContentPart", "(", "List", "<", "ContentPart", "<", "?", ">", ">", "contentList", ",", "String", "key", ",", "String", "value", ")", "{", "if", "(", "(", "key", "!=", "null", ")", "&&", "(", "value", "!=", "null", ")...
This function adds a string content part @param contentList The content list with all the created parts @param key The parameter key @param value The parameter value
[ "This", "function", "adds", "a", "string", "content", "part" ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java#L492-L501
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java
MultiPartFaxJob2HTTPRequestConverter.addAdditionalParameters
protected final void addAdditionalParameters(List<ContentPart<?>> contentList) { //add additional parameters if(this.additionalParameters!=null) { Iterator<Entry<String,String>> iterator=this.additionalParameters.entrySet().iterator(); Entry<String,String> entry=null;...
java
protected final void addAdditionalParameters(List<ContentPart<?>> contentList) { //add additional parameters if(this.additionalParameters!=null) { Iterator<Entry<String,String>> iterator=this.additionalParameters.entrySet().iterator(); Entry<String,String> entry=null;...
[ "protected", "final", "void", "addAdditionalParameters", "(", "List", "<", "ContentPart", "<", "?", ">", ">", "contentList", ")", "{", "//add additional parameters", "if", "(", "this", ".", "additionalParameters", "!=", "null", ")", "{", "Iterator", "<", "Entry"...
This function adds the additional parameters. @param contentList The content list with all the created parts
[ "This", "function", "adds", "the", "additional", "parameters", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java#L528-L552
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java
MultiPartFaxJob2HTTPRequestConverter.addAdditionalContentParts
protected void addAdditionalContentParts(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType,FaxJob faxJob,List<ContentPart<?>> contentList) { //empty hook for extending classes }
java
protected void addAdditionalContentParts(HTTPFaxClientSpi faxClientSpi,FaxActionType faxActionType,FaxJob faxJob,List<ContentPart<?>> contentList) { //empty hook for extending classes }
[ "protected", "void", "addAdditionalContentParts", "(", "HTTPFaxClientSpi", "faxClientSpi", ",", "FaxActionType", "faxActionType", ",", "FaxJob", "faxJob", ",", "List", "<", "ContentPart", "<", "?", ">", ">", "contentList", ")", "{", "//empty hook for extending classes",...
This function enables extending classes to add additional content parts. @param faxClientSpi The HTTP fax client SPI @param faxActionType The fax action type @param faxJob The fax job object @param contentList The content list with all the created parts
[ "This", "function", "enables", "extending", "classes", "to", "add", "additional", "content", "parts", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/MultiPartFaxJob2HTTPRequestConverter.java#L566-L569
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/AbstractRequestParser.java
AbstractRequestParser.getFileInfoFromInputData
public FileInfo getFileInfoFromInputData(T inputData) { if(!this.initialized) { throw new FaxException("Fax bridge not initialized."); } //get file info FileInfo fileInfo=this.getFileInfoFromInputDataImpl(inputData); return fileInfo; }
java
public FileInfo getFileInfoFromInputData(T inputData) { if(!this.initialized) { throw new FaxException("Fax bridge not initialized."); } //get file info FileInfo fileInfo=this.getFileInfoFromInputDataImpl(inputData); return fileInfo; }
[ "public", "FileInfo", "getFileInfoFromInputData", "(", "T", "inputData", ")", "{", "if", "(", "!", "this", ".", "initialized", ")", "{", "throw", "new", "FaxException", "(", "\"Fax bridge not initialized.\"", ")", ";", "}", "//get file info", "FileInfo", "fileInfo...
This function returns the file info from the input data. @param inputData The input data @return The file info
[ "This", "function", "returns", "the", "file", "info", "from", "the", "input", "data", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/AbstractRequestParser.java#L60-L71
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/vbs/VBSProcessOutputHandler.java
VBSProcessOutputHandler.getFaxJobStatusFromWindowsFaxJobStatusString
protected FaxJobStatus getFaxJobStatusFromWindowsFaxJobStatusString(String faxJobStatusStr) { FaxJobStatus faxJobStatus=FaxJobStatus.UNKNOWN; if((faxJobStatusStr!=null)&&(faxJobStatusStr.length()>0)) { if((faxJobStatusStr.equalsIgnoreCase("Pending"))||(faxJobStatusStr.equalsIgnor...
java
protected FaxJobStatus getFaxJobStatusFromWindowsFaxJobStatusString(String faxJobStatusStr) { FaxJobStatus faxJobStatus=FaxJobStatus.UNKNOWN; if((faxJobStatusStr!=null)&&(faxJobStatusStr.length()>0)) { if((faxJobStatusStr.equalsIgnoreCase("Pending"))||(faxJobStatusStr.equalsIgnor...
[ "protected", "FaxJobStatus", "getFaxJobStatusFromWindowsFaxJobStatusString", "(", "String", "faxJobStatusStr", ")", "{", "FaxJobStatus", "faxJobStatus", "=", "FaxJobStatus", ".", "UNKNOWN", ";", "if", "(", "(", "faxJobStatusStr", "!=", "null", ")", "&&", "(", "faxJobS...
This function returns the fax job status based on the windows fax job status string value. @param faxJobStatusStr The fax job status string value @return The fax job status
[ "This", "function", "returns", "the", "fax", "job", "status", "based", "on", "the", "windows", "fax", "job", "status", "string", "value", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/vbs/VBSProcessOutputHandler.java#L42-L62
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/HTTPFaxClientSpi.java
HTTPFaxClientSpi.updateFaxJob
protected void updateFaxJob(FaxJob faxJob,HTTPResponse httpResponse,FaxActionType faxActionType) { this.httpResponseHandler.updateFaxJob(faxJob,httpResponse,faxActionType); }
java
protected void updateFaxJob(FaxJob faxJob,HTTPResponse httpResponse,FaxActionType faxActionType) { this.httpResponseHandler.updateFaxJob(faxJob,httpResponse,faxActionType); }
[ "protected", "void", "updateFaxJob", "(", "FaxJob", "faxJob", ",", "HTTPResponse", "httpResponse", ",", "FaxActionType", "faxActionType", ")", "{", "this", ".", "httpResponseHandler", ".", "updateFaxJob", "(", "faxJob", ",", "httpResponse", ",", "faxActionType", ")"...
Updates the fax job based on the data from the HTTP response. @param faxJob The fax job object @param httpResponse The HTTP response @param faxActionType The fax action type
[ "Updates", "the", "fax", "job", "based", "on", "the", "data", "from", "the", "HTTP", "response", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/HTTPFaxClientSpi.java#L641-L644
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/AbstractFaxBridge.java
AbstractFaxBridge.initialize
public final synchronized void initialize(String type,Properties configuration,Object flowOwner) { if(this.initialized) { throw new FaxException("Fax bridge already initialized."); } //set flag this.initialized=true; //get configuration M...
java
public final synchronized void initialize(String type,Properties configuration,Object flowOwner) { if(this.initialized) { throw new FaxException("Fax bridge already initialized."); } //set flag this.initialized=true; //get configuration M...
[ "public", "final", "synchronized", "void", "initialize", "(", "String", "type", ",", "Properties", "configuration", ",", "Object", "flowOwner", ")", "{", "if", "(", "this", ".", "initialized", ")", "{", "throw", "new", "FaxException", "(", "\"Fax bridge already ...
This function initializes the fax bridge. @param type The fax client type (may be null for default type) @param configuration The fax client configuration (may be null) @param flowOwner The flow owner (servlet, CLI main, ....) to be passed to the vendor policy
[ "This", "function", "initializes", "the", "fax", "bridge", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/AbstractFaxBridge.java#L78-L119
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.copyPropertiesToMap
public static void copyPropertiesToMap(Properties source,Map<String,String> target) { if(source!=null) { //convert to map Iterator<Entry<Object,Object>> iterator=source.entrySet().iterator(); Entry<Object,Object> entry=null; String key=null; ...
java
public static void copyPropertiesToMap(Properties source,Map<String,String> target) { if(source!=null) { //convert to map Iterator<Entry<Object,Object>> iterator=source.entrySet().iterator(); Entry<Object,Object> entry=null; String key=null; ...
[ "public", "static", "void", "copyPropertiesToMap", "(", "Properties", "source", ",", "Map", "<", "String", ",", "String", ">", "target", ")", "{", "if", "(", "source", "!=", "null", ")", "{", "//convert to map", "Iterator", "<", "Entry", "<", "Object", ","...
This function copies all mappings from source properties to target map. @param source The source properties @param target The target map to populate
[ "This", "function", "copies", "all", "mappings", "from", "source", "properties", "to", "target", "map", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L81-L103
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.replaceTemplateParameter
public static String replaceTemplateParameter(String template,String parameter,String value,TemplateParameterEncoder encoder) { String text=template; if((text!=null)&&(parameter!=null)) { String updatedValue=value; if(updatedValue==null) { ...
java
public static String replaceTemplateParameter(String template,String parameter,String value,TemplateParameterEncoder encoder) { String text=template; if((text!=null)&&(parameter!=null)) { String updatedValue=value; if(updatedValue==null) { ...
[ "public", "static", "String", "replaceTemplateParameter", "(", "String", "template", ",", "String", "parameter", ",", "String", "value", ",", "TemplateParameterEncoder", "encoder", ")", "{", "String", "text", "=", "template", ";", "if", "(", "(", "text", "!=", ...
This function replaces the parameter with the provided value. @param template The template @param parameter The parameter @param value The value @param encoder The encoder that encodes the template values (may be null) @return The updated template
[ "This", "function", "replaces", "the", "parameter", "with", "the", "provided", "value", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L183-L201
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.urlEncode
public static String urlEncode(String text) { String urlEncodedString=text; if(text!=null) { try { urlEncodedString=URLEncoder.encode(text,SpiUtil.UTF_8_ENCODING_NAME); } catch(UnsupportedEncodingException exception) ...
java
public static String urlEncode(String text) { String urlEncodedString=text; if(text!=null) { try { urlEncodedString=URLEncoder.encode(text,SpiUtil.UTF_8_ENCODING_NAME); } catch(UnsupportedEncodingException exception) ...
[ "public", "static", "String", "urlEncode", "(", "String", "text", ")", "{", "String", "urlEncodedString", "=", "text", ";", "if", "(", "text", "!=", "null", ")", "{", "try", "{", "urlEncodedString", "=", "URLEncoder", ".", "encode", "(", "text", ",", "Sp...
This function URL encodes the given text. @param text The text to encode @return The encoded text
[ "This", "function", "URL", "encodes", "the", "given", "text", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L210-L226
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.urlDecode
public static String urlDecode(String text) { String urlEncodedString=text; if(text!=null) { try { urlEncodedString=URLDecoder.decode(text,SpiUtil.UTF_8_ENCODING_NAME); } catch(UnsupportedEncodingException exception) ...
java
public static String urlDecode(String text) { String urlEncodedString=text; if(text!=null) { try { urlEncodedString=URLDecoder.decode(text,SpiUtil.UTF_8_ENCODING_NAME); } catch(UnsupportedEncodingException exception) ...
[ "public", "static", "String", "urlDecode", "(", "String", "text", ")", "{", "String", "urlEncodedString", "=", "text", ";", "if", "(", "text", "!=", "null", ")", "{", "try", "{", "urlEncodedString", "=", "URLDecoder", ".", "decode", "(", "text", ",", "Sp...
This function URL decodes the given text. @param text The text to decode @return The decoded text
[ "This", "function", "URL", "decodes", "the", "given", "text", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L235-L251
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.getFileParameterValue
private static String getFileParameterValue(FaxJob faxJob) { String value=null; File file=faxJob.getFile(); if(file!=null) { try { //read file (only text files supported) value=IOHelper.readTextFile(faxJob.getFile()); ...
java
private static String getFileParameterValue(FaxJob faxJob) { String value=null; File file=faxJob.getFile(); if(file!=null) { try { //read file (only text files supported) value=IOHelper.readTextFile(faxJob.getFile()); ...
[ "private", "static", "String", "getFileParameterValue", "(", "FaxJob", "faxJob", ")", "{", "String", "value", "=", "null", ";", "File", "file", "=", "faxJob", ".", "getFile", "(", ")", ";", "if", "(", "file", "!=", "null", ")", "{", "try", "{", "//read...
This function returns the file parameter value based on the file content. @param faxJob The fax job object @return The file parameter value
[ "This", "function", "returns", "the", "file", "parameter", "value", "based", "on", "the", "file", "content", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L261-L279
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxJobMonitorImpl.java
FaxJobMonitorImpl.initializeImpl
@Override protected void initializeImpl() { //init data structures this.data=new HashMap<FaxClientSpi,Map<FaxJob,FaxJobStatus>>(20); //get polling interval String value=this.getConfigurationValue(FaxJobMonitorImpl.POLLING_INTERVAL_IN_MILLIES_PROPERTY_KEY); this.pollingIn...
java
@Override protected void initializeImpl() { //init data structures this.data=new HashMap<FaxClientSpi,Map<FaxJob,FaxJobStatus>>(20); //get polling interval String value=this.getConfigurationValue(FaxJobMonitorImpl.POLLING_INTERVAL_IN_MILLIES_PROPERTY_KEY); this.pollingIn...
[ "@", "Override", "protected", "void", "initializeImpl", "(", ")", "{", "//init data structures", "this", ".", "data", "=", "new", "HashMap", "<", "FaxClientSpi", ",", "Map", "<", "FaxJob", ",", "FaxJobStatus", ">", ">", "(", "20", ")", ";", "//get polling in...
This function initializes the fax job monitor.
[ "This", "function", "initializes", "the", "fax", "job", "monitor", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxJobMonitorImpl.java#L55-L91
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxJobMonitorImpl.java
FaxJobMonitorImpl.runPollingCycle
protected void runPollingCycle() { synchronized(this.LOCK) { Set<Entry<FaxClientSpi,Map<FaxJob,FaxJobStatus>>> entrySet=this.data.entrySet(); Iterator<Entry<FaxClientSpi,Map<FaxJob,FaxJobStatus>>> faxClientSpiIterator=entrySet.iterator(); Entry<FaxClientSpi,Map<Fa...
java
protected void runPollingCycle() { synchronized(this.LOCK) { Set<Entry<FaxClientSpi,Map<FaxJob,FaxJobStatus>>> entrySet=this.data.entrySet(); Iterator<Entry<FaxClientSpi,Map<FaxJob,FaxJobStatus>>> faxClientSpiIterator=entrySet.iterator(); Entry<FaxClientSpi,Map<Fa...
[ "protected", "void", "runPollingCycle", "(", ")", "{", "synchronized", "(", "this", ".", "LOCK", ")", "{", "Set", "<", "Entry", "<", "FaxClientSpi", ",", "Map", "<", "FaxJob", ",", "FaxJobStatus", ">", ">", ">", "entrySet", "=", "this", ".", "data", "....
Runs the polling cycle to fetch and create monitor events.
[ "Runs", "the", "polling", "cycle", "to", "fetch", "and", "create", "monitor", "events", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxJobMonitorImpl.java#L154-L260
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxJobMonitor.java
AbstractFaxJobMonitor.getConfigurationValue
protected final String getConfigurationValue(String key) { //get value String value=this.monitorConfiguration.get(key); //trim value if(value!=null) { value=value.trim(); //set as null if empty string if(value.length()...
java
protected final String getConfigurationValue(String key) { //get value String value=this.monitorConfiguration.get(key); //trim value if(value!=null) { value=value.trim(); //set as null if empty string if(value.length()...
[ "protected", "final", "String", "getConfigurationValue", "(", "String", "key", ")", "{", "//get value", "String", "value", "=", "this", ".", "monitorConfiguration", ".", "get", "(", "key", ")", ";", "//trim value", "if", "(", "value", "!=", "null", ")", "{",...
Returns the value from the monitor configuration based on the provided configuration key. @param key The configuration key @return The value
[ "Returns", "the", "value", "from", "the", "monitor", "configuration", "based", "on", "the", "provided", "configuration", "key", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxJobMonitor.java#L85-L105
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java
WindowsFaxClientSpiHelper.loadNativeLibrary
public static void loadNativeLibrary(Logger logger) { synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { if(!WindowsFaxClientSpiHelper.nativeLibraryLoaded) { try { //get temporary directory File direct...
java
public static void loadNativeLibrary(Logger logger) { synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { if(!WindowsFaxClientSpiHelper.nativeLibraryLoaded) { try { //get temporary directory File direct...
[ "public", "static", "void", "loadNativeLibrary", "(", "Logger", "logger", ")", "{", "synchronized", "(", "WindowsFaxClientSpiHelper", ".", "NATIVE_LOCK", ")", "{", "if", "(", "!", "WindowsFaxClientSpiHelper", ".", "nativeLibraryLoaded", ")", "{", "try", "{", "//ge...
Loads the native library if not loaded before. @param logger The logger
[ "Loads", "the", "native", "library", "if", "not", "loaded", "before", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java#L95-L142
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java
WindowsFaxClientSpiHelper.getServerNameFromConfiguration
public static String getServerNameFromConfiguration(FaxClientSpi faxClientSpi) { //get logger Logger logger=faxClientSpi.getLogger(); //get fax server name String faxServerName=faxClientSpi.getConfigurationValue(FaxClientSpiConfigurationConstants.FAX_SERVER_NAME_PROPERTY_KEY...
java
public static String getServerNameFromConfiguration(FaxClientSpi faxClientSpi) { //get logger Logger logger=faxClientSpi.getLogger(); //get fax server name String faxServerName=faxClientSpi.getConfigurationValue(FaxClientSpiConfigurationConstants.FAX_SERVER_NAME_PROPERTY_KEY...
[ "public", "static", "String", "getServerNameFromConfiguration", "(", "FaxClientSpi", "faxClientSpi", ")", "{", "//get logger", "Logger", "logger", "=", "faxClientSpi", ".", "getLogger", "(", ")", ";", "//get fax server name", "String", "faxServerName", "=", "faxClientSp...
This function returns the server name from the SPI configuration. @param faxClientSpi The fax client SPI @return The server name
[ "This", "function", "returns", "the", "server", "name", "from", "the", "SPI", "configuration", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java#L161-L171
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java
WindowsFaxClientSpiHelper.getOutputPart
public static String getOutputPart(ProcessOutput processOutput,String prefix) { //get output String output=processOutput.getOutputText(); if(output!=null) { //set flag boolean validOutput=false; int index=output.indexOf(prefix); if(in...
java
public static String getOutputPart(ProcessOutput processOutput,String prefix) { //get output String output=processOutput.getOutputText(); if(output!=null) { //set flag boolean validOutput=false; int index=output.indexOf(prefix); if(in...
[ "public", "static", "String", "getOutputPart", "(", "ProcessOutput", "processOutput", ",", "String", "prefix", ")", "{", "//get output", "String", "output", "=", "processOutput", ".", "getOutputText", "(", ")", ";", "if", "(", "output", "!=", "null", ")", "{",...
This function returns the relevant part from the process output. @param processOutput The process output @param prefix The prefix to look for in the output @return The relevant output part
[ "This", "function", "returns", "the", "relevant", "part", "from", "the", "process", "output", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsFaxClientSpiHelper.java#L282-L326
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/comm/RXTXCommPortAdapter.java
RXTXCommPortAdapter.getInputStream
public InputStream getInputStream() { InputStream stream=null; try { stream=this.commPort.getInputStream(); } catch(IOException exception) { throw new FaxException("Unable to extract input stream.",exception); } return ...
java
public InputStream getInputStream() { InputStream stream=null; try { stream=this.commPort.getInputStream(); } catch(IOException exception) { throw new FaxException("Unable to extract input stream.",exception); } return ...
[ "public", "InputStream", "getInputStream", "(", ")", "{", "InputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "this", ".", "commPort", ".", "getInputStream", "(", ")", ";", "}", "catch", "(", "IOException", "exception", ")", "{", "throw",...
This function returns the input stream to the COMM port. @return The input stream
[ "This", "function", "returns", "the", "input", "stream", "to", "the", "COMM", "port", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/comm/RXTXCommPortAdapter.java#L61-L74
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/comm/RXTXCommPortAdapter.java
RXTXCommPortAdapter.getOutputStream
public OutputStream getOutputStream() { OutputStream stream=null; try { stream=this.commPort.getOutputStream(); } catch(IOException exception) { throw new FaxException("Unable to extract output stream.",exception); } re...
java
public OutputStream getOutputStream() { OutputStream stream=null; try { stream=this.commPort.getOutputStream(); } catch(IOException exception) { throw new FaxException("Unable to extract output stream.",exception); } re...
[ "public", "OutputStream", "getOutputStream", "(", ")", "{", "OutputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "this", ".", "commPort", ".", "getOutputStream", "(", ")", ";", "}", "catch", "(", "IOException", "exception", ")", "{", "thr...
This function returns the output stream to the COMM port. @return The output stream
[ "This", "function", "returns", "the", "output", "stream", "to", "the", "COMM", "port", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/comm/RXTXCommPortAdapter.java#L81-L94
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxClientSpiFactory.java
FaxClientSpiFactory.getLogger
private static Logger getLogger() { if(FaxClientSpiFactory.logger==null) { synchronized(FaxClientSpiFactory.class) { if(FaxClientSpiFactory.logger==null) { //get logger manager LoggerManager loggerManager...
java
private static Logger getLogger() { if(FaxClientSpiFactory.logger==null) { synchronized(FaxClientSpiFactory.class) { if(FaxClientSpiFactory.logger==null) { //get logger manager LoggerManager loggerManager...
[ "private", "static", "Logger", "getLogger", "(", ")", "{", "if", "(", "FaxClientSpiFactory", ".", "logger", "==", "null", ")", "{", "synchronized", "(", "FaxClientSpiFactory", ".", "class", ")", "{", "if", "(", "FaxClientSpiFactory", ".", "logger", "==", "nu...
This function returns the internal logger for the fax4j framework. @return The logger
[ "This", "function", "returns", "the", "internal", "logger", "for", "the", "fax4j", "framework", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxClientSpiFactory.java#L347-L371
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxClientSpiFactory.java
FaxClientSpiFactory.getFaxJobMonitor
private static FaxJobMonitor getFaxJobMonitor() { //get system configuration Map<String,String> systemConfig=LibraryConfigurationLoader.getSystemConfiguration(); if(FaxClientSpiFactory.faxJobMonitor==null) { synchronized(FaxClientSpiFactory.class) { ...
java
private static FaxJobMonitor getFaxJobMonitor() { //get system configuration Map<String,String> systemConfig=LibraryConfigurationLoader.getSystemConfiguration(); if(FaxClientSpiFactory.faxJobMonitor==null) { synchronized(FaxClientSpiFactory.class) { ...
[ "private", "static", "FaxJobMonitor", "getFaxJobMonitor", "(", ")", "{", "//get system configuration", "Map", "<", "String", ",", "String", ">", "systemConfig", "=", "LibraryConfigurationLoader", ".", "getSystemConfiguration", "(", ")", ";", "if", "(", "FaxClientSpiFa...
This function returns the fax job monitor. @return The fax job monitor
[ "This", "function", "returns", "the", "fax", "job", "monitor", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxClientSpiFactory.java#L378-L405
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxClientSpiFactory.java
FaxClientSpiFactory.createFaxJobMonitor
private static FaxJobMonitor createFaxJobMonitor(Map<String,String> systemConfig) { //get class name String className=systemConfig.get(FaxClientSpiFactory.FAX_JOB_MONITOR_CLASS_NAME_PROPERTY_KEY); if((className==null)||(className.length()==0)) { className=FaxJobMonitorImp...
java
private static FaxJobMonitor createFaxJobMonitor(Map<String,String> systemConfig) { //get class name String className=systemConfig.get(FaxClientSpiFactory.FAX_JOB_MONITOR_CLASS_NAME_PROPERTY_KEY); if((className==null)||(className.length()==0)) { className=FaxJobMonitorImp...
[ "private", "static", "FaxJobMonitor", "createFaxJobMonitor", "(", "Map", "<", "String", ",", "String", ">", "systemConfig", ")", "{", "//get class name", "String", "className", "=", "systemConfig", ".", "get", "(", "FaxClientSpiFactory", ".", "FAX_JOB_MONITOR_CLASS_NA...
This function creates the fax job monitor used by the fax4j framework. @param systemConfig The system configuration @return The logger
[ "This", "function", "creates", "the", "fax", "job", "monitor", "used", "by", "the", "fax4j", "framework", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxClientSpiFactory.java#L414-L427
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxClientSpiFactory.java
FaxClientSpiFactory.createFaxClientSpiProxy
private static FaxClientSpiProxy createFaxClientSpiProxy(FaxClientSpi faxClientSpi) { //create fax client SPI interceptors FaxClientSpiInterceptor[] interceptors=FaxClientSpiFactory.createFaxClientSpiInterceptors(faxClientSpi); //get class name String className=faxClientSpi....
java
private static FaxClientSpiProxy createFaxClientSpiProxy(FaxClientSpi faxClientSpi) { //create fax client SPI interceptors FaxClientSpiInterceptor[] interceptors=FaxClientSpiFactory.createFaxClientSpiInterceptors(faxClientSpi); //get class name String className=faxClientSpi....
[ "private", "static", "FaxClientSpiProxy", "createFaxClientSpiProxy", "(", "FaxClientSpi", "faxClientSpi", ")", "{", "//create fax client SPI interceptors", "FaxClientSpiInterceptor", "[", "]", "interceptors", "=", "FaxClientSpiFactory", ".", "createFaxClientSpiInterceptors", "(",...
This function creates the fax client SPI proxy. @param faxClientSpi The fax client SPI @return The fax client SPI proxy
[ "This", "function", "creates", "the", "fax", "client", "SPI", "proxy", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxClientSpiFactory.java#L436-L455
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/FaxClientSpiFactory.java
FaxClientSpiFactory.createFaxClientSpiInterceptors
private static FaxClientSpiInterceptor[] createFaxClientSpiInterceptors(FaxClientSpi faxClientSpi) { //get type list String typeListStr=faxClientSpi.getConfigurationValue(FaxClientSpiFactory.SPI_INTERCEPTOR_LIST_PROPERTY_KEY); FaxClientSpiInterceptor[] interceptors=null; if(typeListS...
java
private static FaxClientSpiInterceptor[] createFaxClientSpiInterceptors(FaxClientSpi faxClientSpi) { //get type list String typeListStr=faxClientSpi.getConfigurationValue(FaxClientSpiFactory.SPI_INTERCEPTOR_LIST_PROPERTY_KEY); FaxClientSpiInterceptor[] interceptors=null; if(typeListS...
[ "private", "static", "FaxClientSpiInterceptor", "[", "]", "createFaxClientSpiInterceptors", "(", "FaxClientSpi", "faxClientSpi", ")", "{", "//get type list", "String", "typeListStr", "=", "faxClientSpi", ".", "getConfigurationValue", "(", "FaxClientSpiFactory", ".", "SPI_IN...
This function creates the fax client SPI interceptors. @param faxClientSpi The fax client SPI @return The interceptors
[ "This", "function", "creates", "the", "fax", "client", "SPI", "interceptors", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/FaxClientSpiFactory.java#L464-L516
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java
WindowsJNIFaxClientSpi.preNativeCall
protected void preNativeCall() { //get logger Logger logger=this.getLogger(); //get log level LogLevel logLevel=logger.getLogLevel(); boolean debugMode=false; if(logLevel.equals(LogLevel.DEBUG)) { debugMode=true; } ...
java
protected void preNativeCall() { //get logger Logger logger=this.getLogger(); //get log level LogLevel logLevel=logger.getLogLevel(); boolean debugMode=false; if(logLevel.equals(LogLevel.DEBUG)) { debugMode=true; } ...
[ "protected", "void", "preNativeCall", "(", ")", "{", "//get logger", "Logger", "logger", "=", "this", ".", "getLogger", "(", ")", ";", "//get log level", "LogLevel", "logLevel", "=", "logger", ".", "getLogLevel", "(", ")", ";", "boolean", "debugMode", "=", "...
This function is invoked before any native call to set the native layer debug mode.
[ "This", "function", "is", "invoked", "before", "any", "native", "call", "to", "set", "the", "native", "layer", "debug", "mode", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java#L110-L126
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java
WindowsJNIFaxClientSpi.winGetFaxJobStatus
private String winGetFaxJobStatus(String serverName,int faxJobID) { String status=null; synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call this.preNativeCall(); //invoke native status=WindowsJNIFaxClientSpi.get...
java
private String winGetFaxJobStatus(String serverName,int faxJobID) { String status=null; synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call this.preNativeCall(); //invoke native status=WindowsJNIFaxClientSpi.get...
[ "private", "String", "winGetFaxJobStatus", "(", "String", "serverName", ",", "int", "faxJobID", ")", "{", "String", "status", "=", "null", ";", "synchronized", "(", "WindowsFaxClientSpiHelper", ".", "NATIVE_LOCK", ")", "{", "//pre native call", "this", ".", "preNa...
This function returns the fax job status. @param serverName The fax server name @param faxJobID The fax job ID @return The fax job status
[ "This", "function", "returns", "the", "fax", "job", "status", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java#L349-L362
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java
MultiPartHTTPRequestParser.getContentPartAsString
protected String getContentPartAsString(Map<String,ContentPart<?>> contentPartsMap,String parameter) { //get part String stringValue=null; ContentPart<?> contentPart=contentPartsMap.get(parameter); if(contentPart!=null) { ContentPartType contentPartType=contentPar...
java
protected String getContentPartAsString(Map<String,ContentPart<?>> contentPartsMap,String parameter) { //get part String stringValue=null; ContentPart<?> contentPart=contentPartsMap.get(parameter); if(contentPart!=null) { ContentPartType contentPartType=contentPar...
[ "protected", "String", "getContentPartAsString", "(", "Map", "<", "String", ",", "ContentPart", "<", "?", ">", ">", "contentPartsMap", ",", "String", "parameter", ")", "{", "//get part", "String", "stringValue", "=", "null", ";", "ContentPart", "<", "?", ">", ...
This function returns the content part string value. @param contentPartsMap The content parts map @param parameter The part parameter name @return The part string value
[ "This", "function", "returns", "the", "content", "part", "string", "value", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java#L340-L375
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java
MultiPartHTTPRequestParser.getContentPartsAsMap
protected Map<String,ContentPart<?>> getContentPartsAsMap(HTTPRequest httpRequest) { Map<String,ContentPart<?>> contentPartsMap=null; ContentType contentType=httpRequest.getContentType(); switch(contentType) { case MULTI_PART: //init map co...
java
protected Map<String,ContentPart<?>> getContentPartsAsMap(HTTPRequest httpRequest) { Map<String,ContentPart<?>> contentPartsMap=null; ContentType contentType=httpRequest.getContentType(); switch(contentType) { case MULTI_PART: //init map co...
[ "protected", "Map", "<", "String", ",", "ContentPart", "<", "?", ">", ">", "getContentPartsAsMap", "(", "HTTPRequest", "httpRequest", ")", "{", "Map", "<", "String", ",", "ContentPart", "<", "?", ">", ">", "contentPartsMap", "=", "null", ";", "ContentType", ...
This function returns the HTTP request multi parts as map. @param httpRequest The HTTP request @return The HTTP request multi parts as map
[ "This", "function", "returns", "the", "HTTP", "request", "multi", "parts", "as", "map", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java#L384-L416
train
sagiegurari/fax4j
src/main/java/org/fax4j/ProductInfo.java
ProductInfo.getProductInfoPrintout
public static String getProductInfoPrintout() { //read properties Properties properties=LibraryConfigurationLoader.readInternalConfiguration(); //get values String name=properties.getProperty("org.fax4j.product.name"); String version=properties.getProperty("org.fax4j.product...
java
public static String getProductInfoPrintout() { //read properties Properties properties=LibraryConfigurationLoader.readInternalConfiguration(); //get values String name=properties.getProperty("org.fax4j.product.name"); String version=properties.getProperty("org.fax4j.product...
[ "public", "static", "String", "getProductInfoPrintout", "(", ")", "{", "//read properties", "Properties", "properties", "=", "LibraryConfigurationLoader", ".", "readInternalConfiguration", "(", ")", ";", "//get values", "String", "name", "=", "properties", ".", "getProp...
Returns the product info printout. @return The product info printout
[ "Returns", "the", "product", "info", "printout", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/ProductInfo.java#L58-L79
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/DefaultProcessExecutor.java
DefaultProcessExecutor.parseCommand
protected List<String> parseCommand(ConfigurationHolder configurationHolder,String command) { //init list List<String> commandList=new LinkedList<String>(); StringBuilder buffer=new StringBuilder(command); String part=null; int quoteIndex=-1; int spaceIndex=-1; ...
java
protected List<String> parseCommand(ConfigurationHolder configurationHolder,String command) { //init list List<String> commandList=new LinkedList<String>(); StringBuilder buffer=new StringBuilder(command); String part=null; int quoteIndex=-1; int spaceIndex=-1; ...
[ "protected", "List", "<", "String", ">", "parseCommand", "(", "ConfigurationHolder", "configurationHolder", ",", "String", "command", ")", "{", "//init list", "List", "<", "String", ">", "commandList", "=", "new", "LinkedList", "<", "String", ">", "(", ")", ";...
This function parsers the command and converts to a command array. @param configurationHolder The configuration holder used when invoking the process @param command The command to parse @return The parsed command as an array
[ "This", "function", "parsers", "the", "command", "and", "converts", "to", "a", "command", "array", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/DefaultProcessExecutor.java#L83-L163
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/comm/AbstractFaxModemAdapter.java
AbstractFaxModemAdapter.initialize
public void initialize(FaxClientSpi faxClientSpi) { if(this.initialized) { throw new FaxException("Fax Modem Adapter already initialized."); } //set flag this.initialized=true; //get logger Logger logger=faxClientSpi.getLogger(); ...
java
public void initialize(FaxClientSpi faxClientSpi) { if(this.initialized) { throw new FaxException("Fax Modem Adapter already initialized."); } //set flag this.initialized=true; //get logger Logger logger=faxClientSpi.getLogger(); ...
[ "public", "void", "initialize", "(", "FaxClientSpi", "faxClientSpi", ")", "{", "if", "(", "this", ".", "initialized", ")", "{", "throw", "new", "FaxException", "(", "\"Fax Modem Adapter already initialized.\"", ")", ";", "}", "//set flag", "this", ".", "initialize...
This function initializes the fax modem adapter. @param faxClientSpi The fax client SPI
[ "This", "function", "initializes", "the", "fax", "modem", "adapter", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/comm/AbstractFaxModemAdapter.java#L37-L55
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java
AbstractMailFaxClientSpi.createMailConnectionFactoryImpl
protected final MailConnectionFactory createMailConnectionFactoryImpl(String className) { String factoryClassName=className; if(factoryClassName==null) { factoryClassName=MailConnectionFactoryImpl.class.getName(); } //create new instance MailConnectionFac...
java
protected final MailConnectionFactory createMailConnectionFactoryImpl(String className) { String factoryClassName=className; if(factoryClassName==null) { factoryClassName=MailConnectionFactoryImpl.class.getName(); } //create new instance MailConnectionFac...
[ "protected", "final", "MailConnectionFactory", "createMailConnectionFactoryImpl", "(", "String", "className", ")", "{", "String", "factoryClassName", "=", "className", ";", "if", "(", "factoryClassName", "==", "null", ")", "{", "factoryClassName", "=", "MailConnectionFa...
Creates and returns the mail connection factory. @param className The connection factory class name @return The mail connection factory
[ "Creates", "and", "returns", "the", "mail", "connection", "factory", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java#L207-L222
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java
AbstractMailFaxClientSpi.createMailConnection
protected Connection<MailResourcesHolder> createMailConnection() { //create new connection Connection<MailResourcesHolder> mailConnection=this.connectionFactory.createConnection(); //log debug Logger logger=this.getLogger(); logger.logInfo(new Object[]{"Created mail connecti...
java
protected Connection<MailResourcesHolder> createMailConnection() { //create new connection Connection<MailResourcesHolder> mailConnection=this.connectionFactory.createConnection(); //log debug Logger logger=this.getLogger(); logger.logInfo(new Object[]{"Created mail connecti...
[ "protected", "Connection", "<", "MailResourcesHolder", ">", "createMailConnection", "(", ")", "{", "//create new connection", "Connection", "<", "MailResourcesHolder", ">", "mailConnection", "=", "this", ".", "connectionFactory", ".", "createConnection", "(", ")", ";", ...
Creates and returns the mail connection to be used to send the fax via mail. @return The mail connection
[ "Creates", "and", "returns", "the", "mail", "connection", "to", "be", "used", "to", "send", "the", "fax", "via", "mail", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java#L248-L258
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java
AbstractMailFaxClientSpi.closeMailConnection
protected void closeMailConnection(Connection<MailResourcesHolder> mailConnection) throws IOException { if(mailConnection!=null) { //get logger Logger logger=this.getLogger(); //release connection logger.logInfo(new Object[]{"Closing mail ...
java
protected void closeMailConnection(Connection<MailResourcesHolder> mailConnection) throws IOException { if(mailConnection!=null) { //get logger Logger logger=this.getLogger(); //release connection logger.logInfo(new Object[]{"Closing mail ...
[ "protected", "void", "closeMailConnection", "(", "Connection", "<", "MailResourcesHolder", ">", "mailConnection", ")", "throws", "IOException", "{", "if", "(", "mailConnection", "!=", "null", ")", "{", "//get logger", "Logger", "logger", "=", "this", ".", "getLogg...
This function closes the provided mail connection. @param mailConnection The mail connection to close @throws IOException Never thrown
[ "This", "function", "closes", "the", "provided", "mail", "connection", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java#L268-L279
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java
AbstractMailFaxClientSpi.getMailConnection
protected Connection<MailResourcesHolder> getMailConnection() { Connection<MailResourcesHolder> mailConnection=null; if(this.usePersistentConnection) { synchronized(this) { if(this.connection==null) { //create new co...
java
protected Connection<MailResourcesHolder> getMailConnection() { Connection<MailResourcesHolder> mailConnection=null; if(this.usePersistentConnection) { synchronized(this) { if(this.connection==null) { //create new co...
[ "protected", "Connection", "<", "MailResourcesHolder", ">", "getMailConnection", "(", ")", "{", "Connection", "<", "MailResourcesHolder", ">", "mailConnection", "=", "null", ";", "if", "(", "this", ".", "usePersistentConnection", ")", "{", "synchronized", "(", "th...
Returns the mail connection to be used to send the fax via mail. @return The mail connection
[ "Returns", "the", "mail", "connection", "to", "be", "used", "to", "send", "the", "fax", "via", "mail", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java#L287-L311
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java
AbstractMailFaxClientSpi.sendMail
protected void sendMail(FaxJob faxJob,Connection<MailResourcesHolder> mailConnection,Message message) { if(message==null) { this.throwUnsupportedException(); } else { //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getRe...
java
protected void sendMail(FaxJob faxJob,Connection<MailResourcesHolder> mailConnection,Message message) { if(message==null) { this.throwUnsupportedException(); } else { //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getRe...
[ "protected", "void", "sendMail", "(", "FaxJob", "faxJob", ",", "Connection", "<", "MailResourcesHolder", ">", "mailConnection", ",", "Message", "message", ")", "{", "if", "(", "message", "==", "null", ")", "{", "this", ".", "throwUnsupportedException", "(", ")...
This function will send the mail message. @param faxJob The fax job object containing the needed information @param mailConnection The mail connection (will be released if not persistent) @param message The message to send
[ "This", "function", "will", "send", "the", "mail", "message", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/email/AbstractMailFaxClientSpi.java#L323-L372
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/FaxBridgeImpl.java
FaxBridgeImpl.updateFaxJobWithFileInfo
@Override protected void updateFaxJobWithFileInfo(FaxJob faxJob,FileInfo fileInfo) { //get file File file=fileInfo.getFile(); if(file==null) { //get file name String fileName=fileInfo.getName(); //get file content byte...
java
@Override protected void updateFaxJobWithFileInfo(FaxJob faxJob,FileInfo fileInfo) { //get file File file=fileInfo.getFile(); if(file==null) { //get file name String fileName=fileInfo.getName(); //get file content byte...
[ "@", "Override", "protected", "void", "updateFaxJobWithFileInfo", "(", "FaxJob", "faxJob", ",", "FileInfo", "fileInfo", ")", "{", "//get file", "File", "file", "=", "fileInfo", ".", "getFile", "(", ")", ";", "if", "(", "file", "==", "null", ")", "{", "//ge...
This function stores the file in the local machine and updates the fax job with the new file data. @param faxJob The fax job object to be updated @param fileInfo The file information of the requested fax
[ "This", "function", "stores", "the", "file", "in", "the", "local", "machine", "and", "updates", "the", "fax", "job", "with", "the", "new", "file", "data", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/FaxBridgeImpl.java#L85-L115
train
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/http/SimpleHTTPRequestParser.java
SimpleHTTPRequestParser.convertParametersTextToMap
protected Map<String,String> convertParametersTextToMap(HTTPRequest request) { //init data structure Map<String,String> map=new HashMap<String,String>(); //get parameters text String parametersText=request.getParametersText(); if(parametersText!=null) { ...
java
protected Map<String,String> convertParametersTextToMap(HTTPRequest request) { //init data structure Map<String,String> map=new HashMap<String,String>(); //get parameters text String parametersText=request.getParametersText(); if(parametersText!=null) { ...
[ "protected", "Map", "<", "String", ",", "String", ">", "convertParametersTextToMap", "(", "HTTPRequest", "request", ")", "{", "//init data structure", "Map", "<", "String", ",", "String", ">", "map", "=", "new", "HashMap", "<", "String", ",", "String", ">", ...
This function converts the provided query string to a map object. @param request The HTTP request @return The query string broken to key/value
[ "This", "function", "converts", "the", "provided", "query", "string", "to", "a", "map", "object", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/http/SimpleHTTPRequestParser.java#L105-L155
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java
MacFaxClientSpi.createSubmitFaxCommand
protected String createSubmitFaxCommand(FaxJob faxJob) { //init buffer StringBuilder buffer=new StringBuilder(); //create command buffer.append(this.submitCommand); buffer.append(" "); buffer.append(this.printQueueParameter); buffer.append(" "); ...
java
protected String createSubmitFaxCommand(FaxJob faxJob) { //init buffer StringBuilder buffer=new StringBuilder(); //create command buffer.append(this.submitCommand); buffer.append(" "); buffer.append(this.printQueueParameter); buffer.append(" "); ...
[ "protected", "String", "createSubmitFaxCommand", "(", "FaxJob", "faxJob", ")", "{", "//init buffer", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "//create command", "buffer", ".", "append", "(", "this", ".", "submitCommand", ")", ";", ...
Creates and returns the submit fax command. @param faxJob The fax job object containing the needed information @return The command
[ "Creates", "and", "returns", "the", "submit", "fax", "command", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java#L258-L293
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java
MacFaxClientSpi.executeProcess
protected ProcessOutput executeProcess(String command,FaxActionType faxActionType) { //execute process ProcessOutput processOutput=ProcessExecutorHelper.executeProcess(this,command); //validate process output this.processOutputValidator.validateProcessOutput(this,processOutput,faxAc...
java
protected ProcessOutput executeProcess(String command,FaxActionType faxActionType) { //execute process ProcessOutput processOutput=ProcessExecutorHelper.executeProcess(this,command); //validate process output this.processOutputValidator.validateProcessOutput(this,processOutput,faxAc...
[ "protected", "ProcessOutput", "executeProcess", "(", "String", "command", ",", "FaxActionType", "faxActionType", ")", "{", "//execute process", "ProcessOutput", "processOutput", "=", "ProcessExecutorHelper", ".", "executeProcess", "(", "this", ",", "command", ")", ";", ...
This function executes the external command to send the fax. @param command The command to execute @param faxActionType The fax action type @return The process output
[ "This", "function", "executes", "the", "external", "command", "to", "send", "the", "fax", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java#L304-L313
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.formatLogMessage
protected String formatLogMessage(LogLevel level,Object[] message,Throwable throwable) { //get text String messageText=this.format(message); String throwableText=this.format(throwable); //init buffer StringBuilder buffer=new StringBuilder(); //append prefix ...
java
protected String formatLogMessage(LogLevel level,Object[] message,Throwable throwable) { //get text String messageText=this.format(message); String throwableText=this.format(throwable); //init buffer StringBuilder buffer=new StringBuilder(); //append prefix ...
[ "protected", "String", "formatLogMessage", "(", "LogLevel", "level", ",", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "//get text", "String", "messageText", "=", "this", ".", "format", "(", "message", ")", ";", "String", "throwableT...
Converts the provided data to string. @param level The log level @param message The message parts (may be null) @param throwable The throwable (may be null) @return The string
[ "Converts", "the", "provided", "data", "to", "string", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L40-L73
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.format
protected String format(Object[] message) { String text=null; if(message!=null) { //init buffer StringBuilder buffer=new StringBuilder(); //get array size int amount=message.length; Object object=null; ...
java
protected String format(Object[] message) { String text=null; if(message!=null) { //init buffer StringBuilder buffer=new StringBuilder(); //get array size int amount=message.length; Object object=null; ...
[ "protected", "String", "format", "(", "Object", "[", "]", "message", ")", "{", "String", "text", "=", "null", ";", "if", "(", "message", "!=", "null", ")", "{", "//init buffer", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "//ge...
Converts the provided message object array to string. @param message The message parts (may be null) @return The string
[ "Converts", "the", "provided", "message", "object", "array", "to", "string", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L82-L108
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.format
protected String format(Throwable throwable) { String text=null; if(throwable!=null) { //init writer StringWriter writer=new StringWriter(1500); //write throwable throwable.printStackTrace(new PrintWriter(writer)); ...
java
protected String format(Throwable throwable) { String text=null; if(throwable!=null) { //init writer StringWriter writer=new StringWriter(1500); //write throwable throwable.printStackTrace(new PrintWriter(writer)); ...
[ "protected", "String", "format", "(", "Throwable", "throwable", ")", "{", "String", "text", "=", "null", ";", "if", "(", "throwable", "!=", "null", ")", "{", "//init writer", "StringWriter", "writer", "=", "new", "StringWriter", "(", "1500", ")", ";", "//w...
Converts the provided throwable to string. @param throwable The throwable (may be null) @return The string
[ "Converts", "the", "provided", "throwable", "to", "string", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L117-L133
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.setLogLevel
public final void setLogLevel(LogLevel logLevel) { LogLevel updatedLogLevel=logLevel; if(updatedLogLevel==null) { updatedLogLevel=LogLevel.NONE; } this.logLevel=updatedLogLevel; }
java
public final void setLogLevel(LogLevel logLevel) { LogLevel updatedLogLevel=logLevel; if(updatedLogLevel==null) { updatedLogLevel=LogLevel.NONE; } this.logLevel=updatedLogLevel; }
[ "public", "final", "void", "setLogLevel", "(", "LogLevel", "logLevel", ")", "{", "LogLevel", "updatedLogLevel", "=", "logLevel", ";", "if", "(", "updatedLogLevel", "==", "null", ")", "{", "updatedLogLevel", "=", "LogLevel", ".", "NONE", ";", "}", "this", "."...
Sets the minimum log level. @param logLevel The log level
[ "Sets", "the", "minimum", "log", "level", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L141-L150
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logDebug
public void logDebug(Object[] message,Throwable throwable) { this.log(LogLevel.DEBUG,message,throwable); }
java
public void logDebug(Object[] message,Throwable throwable) { this.log(LogLevel.DEBUG,message,throwable); }
[ "public", "void", "logDebug", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "DEBUG", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the debug level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "debug", "level", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L170-L173
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logInfo
public void logInfo(Object[] message,Throwable throwable) { this.log(LogLevel.INFO,message,throwable); }
java
public void logInfo(Object[] message,Throwable throwable) { this.log(LogLevel.INFO,message,throwable); }
[ "public", "void", "logInfo", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "INFO", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the info level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "info", "level", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L183-L186
train
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logError
public void logError(Object[] message,Throwable throwable) { this.log(LogLevel.ERROR,message,throwable); }
java
public void logError(Object[] message,Throwable throwable) { this.log(LogLevel.ERROR,message,throwable); }
[ "public", "void", "logError", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "ERROR", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the error level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "error", "level", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L196-L199
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java
AbstractFaxClientSpi.fireFaxMonitorEvent
public final void fireFaxMonitorEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus) { this.fireFaxEvent(id,faxJob,faxJobStatus); }
java
public final void fireFaxMonitorEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus) { this.fireFaxEvent(id,faxJob,faxJobStatus); }
[ "public", "final", "void", "fireFaxMonitorEvent", "(", "FaxMonitorEventID", "id", ",", "FaxJob", "faxJob", ",", "FaxJobStatus", "faxJobStatus", ")", "{", "this", ".", "fireFaxEvent", "(", "id", ",", "faxJob", ",", "faxJobStatus", ")", ";", "}" ]
This function fires a new fax monitor event. @param id The fax monitor event ID @param faxJob The fax job @param faxJobStatus The fax job status
[ "This", "function", "fires", "a", "new", "fax", "monitor", "event", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java#L246-L249
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java
AbstractFaxClientSpi.invokeFaxJobIDValidation
protected void invokeFaxJobIDValidation(FaxJob faxJob) { //validate fax job is not null this.invokeFaxJobNullValidation(faxJob); //validate fax job ID String faxJobID=faxJob.getID(); if((faxJobID==null)||(faxJobID.length()==0)) { throw new FaxException("F...
java
protected void invokeFaxJobIDValidation(FaxJob faxJob) { //validate fax job is not null this.invokeFaxJobNullValidation(faxJob); //validate fax job ID String faxJobID=faxJob.getID(); if((faxJobID==null)||(faxJobID.length()==0)) { throw new FaxException("F...
[ "protected", "void", "invokeFaxJobIDValidation", "(", "FaxJob", "faxJob", ")", "{", "//validate fax job is not null", "this", ".", "invokeFaxJobNullValidation", "(", "faxJob", ")", ";", "//validate fax job ID", "String", "faxJobID", "=", "faxJob", ".", "getID", "(", "...
This function invokes the fax job null validation. @param faxJob The fax job
[ "This", "function", "invokes", "the", "fax", "job", "null", "validation", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java#L639-L650
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/HTTPRequest.java
HTTPRequest.setHeaderProperties
public final void setHeaderProperties(Properties headerProperties) { this.headerProperties=null; if(headerProperties!=null) { this.headerProperties=new Properties(); this.headerProperties.putAll(headerProperties); } }
java
public final void setHeaderProperties(Properties headerProperties) { this.headerProperties=null; if(headerProperties!=null) { this.headerProperties=new Properties(); this.headerProperties.putAll(headerProperties); } }
[ "public", "final", "void", "setHeaderProperties", "(", "Properties", "headerProperties", ")", "{", "this", ".", "headerProperties", "=", "null", ";", "if", "(", "headerProperties", "!=", "null", ")", "{", "this", ".", "headerProperties", "=", "new", "Properties"...
This function sets the header properties. @param headerProperties The new value for the header properties
[ "This", "function", "sets", "the", "header", "properties", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/HTTPRequest.java#L102-L110
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/AbstractHTTPClient.java
AbstractHTTPClient.createHTTPClientConfiguration
public HTTPClientConfiguration createHTTPClientConfiguration(ConfigurationHolder configurationHolder) { //get server values String hostName=configurationHolder.getConfigurationValue(HTTPClientConfigurationConstants.HOST_NAME_PROPERTY_KEY); if(hostName==null) { throw new F...
java
public HTTPClientConfiguration createHTTPClientConfiguration(ConfigurationHolder configurationHolder) { //get server values String hostName=configurationHolder.getConfigurationValue(HTTPClientConfigurationConstants.HOST_NAME_PROPERTY_KEY); if(hostName==null) { throw new F...
[ "public", "HTTPClientConfiguration", "createHTTPClientConfiguration", "(", "ConfigurationHolder", "configurationHolder", ")", "{", "//get server values", "String", "hostName", "=", "configurationHolder", ".", "getConfigurationValue", "(", "HTTPClientConfigurationConstants", ".", ...
This function creates the HTTP client configuration to be used later on by this HTTP client type. @param configurationHolder The configuration holder @return The HTTP client configuration
[ "This", "function", "creates", "the", "HTTP", "client", "configuration", "to", "be", "used", "later", "on", "by", "this", "HTTP", "client", "type", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/AbstractHTTPClient.java#L45-L94
train
hivemq/hivemq-spi
src/main/java/com/hivemq/spi/util/PathUtils.java
PathUtils.findAbsoluteAndRelative
public static File findAbsoluteAndRelative(final String fileLocation) { final File file = new File(fileLocation); if (file.isAbsolute()) { return file; } else { return new File(getHiveMQHomeFolder(), fileLocation); } }
java
public static File findAbsoluteAndRelative(final String fileLocation) { final File file = new File(fileLocation); if (file.isAbsolute()) { return file; } else { return new File(getHiveMQHomeFolder(), fileLocation); } }
[ "public", "static", "File", "findAbsoluteAndRelative", "(", "final", "String", "fileLocation", ")", "{", "final", "File", "file", "=", "new", "File", "(", "fileLocation", ")", ";", "if", "(", "file", ".", "isAbsolute", "(", ")", ")", "{", "return", "file",...
Tries to find a file in the given absolute path or relative to the HiveMQ home folder @param fileLocation the absolute or relative path @return a file
[ "Tries", "to", "find", "a", "file", "in", "the", "given", "absolute", "path", "or", "relative", "to", "the", "HiveMQ", "home", "folder" ]
55fa89ccb081ad5b6d46eaca02179272148e64ed
https://github.com/hivemq/hivemq-spi/blob/55fa89ccb081ad5b6d46eaca02179272148e64ed/src/main/java/com/hivemq/spi/util/PathUtils.java#L89-L96
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createMethod
protected HttpMethodBase createMethod(String url,HTTPMethod httpMethod) { if(httpMethod==null) { throw new FaxException("HTTP method not provided."); } if((url==null)||(url.length()==0)) { throw new FaxException("HTTP URL not provided."); } ...
java
protected HttpMethodBase createMethod(String url,HTTPMethod httpMethod) { if(httpMethod==null) { throw new FaxException("HTTP method not provided."); } if((url==null)||(url.length()==0)) { throw new FaxException("HTTP URL not provided."); } ...
[ "protected", "HttpMethodBase", "createMethod", "(", "String", "url", ",", "HTTPMethod", "httpMethod", ")", "{", "if", "(", "httpMethod", "==", "null", ")", "{", "throw", "new", "FaxException", "(", "\"HTTP method not provided.\"", ")", ";", "}", "if", "(", "("...
This function creates and returns a new HTTP method. @param url The target URL @param httpMethod The HTTP method to use @return The new HTTP method
[ "This", "function", "creates", "and", "returns", "a", "new", "HTTP", "method", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L71-L98
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createHTTPResponse
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent) { //create HTTP response HTTPResponse httpResponse=new HTTPResponse(); httpResponse.setStatusCode(statusCode); httpResponse.setContent(responseContent); return httpResponse; }
java
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent) { //create HTTP response HTTPResponse httpResponse=new HTTPResponse(); httpResponse.setStatusCode(statusCode); httpResponse.setContent(responseContent); return httpResponse; }
[ "protected", "HTTPResponse", "createHTTPResponse", "(", "int", "statusCode", ",", "String", "responseContent", ")", "{", "//create HTTP response", "HTTPResponse", "httpResponse", "=", "new", "HTTPResponse", "(", ")", ";", "httpResponse", ".", "setStatusCode", "(", "st...
This function creates and returns the HTTP response object. @param statusCode The HTTP response status code @param responseContent The response content as string @return The HTTP response object
[ "This", "function", "creates", "and", "returns", "the", "HTTP", "response", "object", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L109-L117
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.appendParameters
protected void appendParameters(StringBuilder buffer,String parameters) { if((parameters!=null)&&(parameters.length()>0)) { String updatedParameters=parameters; if(parameters.startsWith("?")) { updatedParameters=parameters.substring(1); ...
java
protected void appendParameters(StringBuilder buffer,String parameters) { if((parameters!=null)&&(parameters.length()>0)) { String updatedParameters=parameters; if(parameters.startsWith("?")) { updatedParameters=parameters.substring(1); ...
[ "protected", "void", "appendParameters", "(", "StringBuilder", "buffer", ",", "String", "parameters", ")", "{", "if", "(", "(", "parameters", "!=", "null", ")", "&&", "(", "parameters", ".", "length", "(", ")", ">", "0", ")", ")", "{", "String", "updated...
This function appends the parameters text to the base URL. @param buffer The buffer to update @param parameters The parameters line
[ "This", "function", "appends", "the", "parameters", "text", "to", "the", "base", "URL", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L163-L221
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createURL
protected String createURL(HTTPRequest httpRequest,HTTPClientConfiguration configuration) { //init buffer StringBuilder buffer=new StringBuilder(100); //create URL String resource=httpRequest.getResource(); this.appendBaseURL(buffer,resource,configuration); String pa...
java
protected String createURL(HTTPRequest httpRequest,HTTPClientConfiguration configuration) { //init buffer StringBuilder buffer=new StringBuilder(100); //create URL String resource=httpRequest.getResource(); this.appendBaseURL(buffer,resource,configuration); String pa...
[ "protected", "String", "createURL", "(", "HTTPRequest", "httpRequest", ",", "HTTPClientConfiguration", "configuration", ")", "{", "//init buffer", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", "100", ")", ";", "//create URL", "String", "resource", "=", ...
This function creates the full URL from the provided values. @param httpRequest The HTTP request to send @param configuration HTTP client configuration @return The full URL
[ "This", "function", "creates", "the", "full", "URL", "from", "the", "provided", "values", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L232-L245
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.setupHTTPRequestHeaderProperties
protected void setupHTTPRequestHeaderProperties(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { //setup header properties Properties headerProperties=httpRequest.getHeaderProperties(); if(headerProperties!=null) { Iterator<Entry<Object,Object>> iterator=headerP...
java
protected void setupHTTPRequestHeaderProperties(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { //setup header properties Properties headerProperties=httpRequest.getHeaderProperties(); if(headerProperties!=null) { Iterator<Entry<Object,Object>> iterator=headerP...
[ "protected", "void", "setupHTTPRequestHeaderProperties", "(", "HTTPRequest", "httpRequest", ",", "HttpMethodBase", "httpMethodClient", ")", "{", "//setup header properties", "Properties", "headerProperties", "=", "httpRequest", ".", "getHeaderProperties", "(", ")", ";", "if...
This function sets the header properties in the HTTP method. @param httpRequest The HTTP request @param httpMethodClient The apache HTTP method
[ "This", "function", "sets", "the", "header", "properties", "in", "the", "HTTP", "method", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L255-L272
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createStringRequestContent
protected RequestEntity createStringRequestContent(HTTPRequest httpRequest) { RequestEntity requestEntity=null; String contentString=httpRequest.getContentAsString(); if(contentString!=null) { try { requestEntity=new StringRequestEntity(content...
java
protected RequestEntity createStringRequestContent(HTTPRequest httpRequest) { RequestEntity requestEntity=null; String contentString=httpRequest.getContentAsString(); if(contentString!=null) { try { requestEntity=new StringRequestEntity(content...
[ "protected", "RequestEntity", "createStringRequestContent", "(", "HTTPRequest", "httpRequest", ")", "{", "RequestEntity", "requestEntity", "=", "null", ";", "String", "contentString", "=", "httpRequest", ".", "getContentAsString", "(", ")", ";", "if", "(", "contentStr...
This function creates a string type request entity and populates it with the data from the provided HTTP request. @param httpRequest The HTTP request @return The request entity
[ "This", "function", "creates", "a", "string", "type", "request", "entity", "and", "populates", "it", "with", "the", "data", "from", "the", "provided", "HTTP", "request", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L282-L299
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createBinaryRequestContent
protected RequestEntity createBinaryRequestContent(HTTPRequest httpRequest) { RequestEntity requestEntity=null; byte[] contentBinary=httpRequest.getContentAsBinary(); if(contentBinary!=null) { requestEntity=new ByteArrayRequestEntity(contentBinary,"binary/octet-stream"); ...
java
protected RequestEntity createBinaryRequestContent(HTTPRequest httpRequest) { RequestEntity requestEntity=null; byte[] contentBinary=httpRequest.getContentAsBinary(); if(contentBinary!=null) { requestEntity=new ByteArrayRequestEntity(contentBinary,"binary/octet-stream"); ...
[ "protected", "RequestEntity", "createBinaryRequestContent", "(", "HTTPRequest", "httpRequest", ")", "{", "RequestEntity", "requestEntity", "=", "null", ";", "byte", "[", "]", "contentBinary", "=", "httpRequest", ".", "getContentAsBinary", "(", ")", ";", "if", "(", ...
This function creates a binary type request entity and populates it with the data from the provided HTTP request. @param httpRequest The HTTP request @return The request entity
[ "This", "function", "creates", "a", "binary", "type", "request", "entity", "and", "populates", "it", "with", "the", "data", "from", "the", "provided", "HTTP", "request", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L309-L319
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createMultiPartRequestContent
protected RequestEntity createMultiPartRequestContent(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { RequestEntity requestEntity=null; ContentPart<?>[] contentParts=httpRequest.getContentAsParts(); if(contentParts!=null) { int partsAmount=contentParts.length; ...
java
protected RequestEntity createMultiPartRequestContent(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { RequestEntity requestEntity=null; ContentPart<?>[] contentParts=httpRequest.getContentAsParts(); if(contentParts!=null) { int partsAmount=contentParts.length; ...
[ "protected", "RequestEntity", "createMultiPartRequestContent", "(", "HTTPRequest", "httpRequest", ",", "HttpMethodBase", "httpMethodClient", ")", "{", "RequestEntity", "requestEntity", "=", "null", ";", "ContentPart", "<", "?", ">", "[", "]", "contentParts", "=", "htt...
This function creates a multi part type request entity and populates it with the data from the provided HTTP request. @param httpRequest The HTTP request @param httpMethodClient The apache HTTP method @return The request entity
[ "This", "function", "creates", "a", "multi", "part", "type", "request", "entity", "and", "populates", "it", "with", "the", "data", "from", "the", "provided", "HTTP", "request", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L331-L387
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.setRequestContent
protected void setRequestContent(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { //set content if(httpMethodClient instanceof EntityEnclosingMethod) { EntityEnclosingMethod pushMethod=(EntityEnclosingMethod)httpMethodClient; RequestEntity reque...
java
protected void setRequestContent(HTTPRequest httpRequest,HttpMethodBase httpMethodClient) { //set content if(httpMethodClient instanceof EntityEnclosingMethod) { EntityEnclosingMethod pushMethod=(EntityEnclosingMethod)httpMethodClient; RequestEntity reque...
[ "protected", "void", "setRequestContent", "(", "HTTPRequest", "httpRequest", ",", "HttpMethodBase", "httpMethodClient", ")", "{", "//set content", "if", "(", "httpMethodClient", "instanceof", "EntityEnclosingMethod", ")", "{", "EntityEnclosingMethod", "pushMethod", "=", "...
This function sets the request content. @param httpRequest The HTTP request @param httpMethodClient The apache HTTP method
[ "This", "function", "sets", "the", "request", "content", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L397-L428
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/AbstractConnectionFactory.java
AbstractConnectionFactory.releaseConnection
public void releaseConnection(Connection<T> connection) { if(connection!=null) { try { //log info this.LOGGER.logInfo(new Object[]{"Closing connection using factory type: ",this.getClass().getName()},null); //get resource ...
java
public void releaseConnection(Connection<T> connection) { if(connection!=null) { try { //log info this.LOGGER.logInfo(new Object[]{"Closing connection using factory type: ",this.getClass().getName()},null); //get resource ...
[ "public", "void", "releaseConnection", "(", "Connection", "<", "T", ">", "connection", ")", "{", "if", "(", "connection", "!=", "null", ")", "{", "try", "{", "//log info", "this", ".", "LOGGER", ".", "logInfo", "(", "new", "Object", "[", "]", "{", "\"C...
Releases the connection. @param connection The connection
[ "Releases", "the", "connection", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/AbstractConnectionFactory.java#L90-L117
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java
HylaFaxClientSpi.createHylaFAXClientConnectionFactory
protected final HylaFAXClientConnectionFactory createHylaFAXClientConnectionFactory(String className) { //create new instance HylaFAXClientConnectionFactory factory=(HylaFAXClientConnectionFactory)ReflectionHelper.createInstance(className); //initialize factory.initializ...
java
protected final HylaFAXClientConnectionFactory createHylaFAXClientConnectionFactory(String className) { //create new instance HylaFAXClientConnectionFactory factory=(HylaFAXClientConnectionFactory)ReflectionHelper.createInstance(className); //initialize factory.initializ...
[ "protected", "final", "HylaFAXClientConnectionFactory", "createHylaFAXClientConnectionFactory", "(", "String", "className", ")", "{", "//create new instance", "HylaFAXClientConnectionFactory", "factory", "=", "(", "HylaFAXClientConnectionFactory", ")", "ReflectionHelper", ".", "c...
Creates and returns the hylafax client connection factory. @param className The connection factory class name @return The hylafax client connection factory
[ "Creates", "and", "returns", "the", "hylafax", "client", "connection", "factory", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java#L214-L223
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java
HylaFaxClientSpi.getHylaFAXClient
protected synchronized HylaFAXClient getHylaFAXClient() { HylaFAXClient client=null; if(this.connection==null) { //create new connection this.connection=this.connectionFactory.createConnection(); } //get client client=this.connection.g...
java
protected synchronized HylaFAXClient getHylaFAXClient() { HylaFAXClient client=null; if(this.connection==null) { //create new connection this.connection=this.connectionFactory.createConnection(); } //get client client=this.connection.g...
[ "protected", "synchronized", "HylaFAXClient", "getHylaFAXClient", "(", ")", "{", "HylaFAXClient", "client", "=", "null", ";", "if", "(", "this", ".", "connection", "==", "null", ")", "{", "//create new connection", "this", ".", "connection", "=", "this", ".", ...
Returns an instance of the hyla fax client. @return The client instance
[ "Returns", "an", "instance", "of", "the", "hyla", "fax", "client", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java#L230-L243
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.getThreadContextClassLoader
public static ClassLoader getThreadContextClassLoader() { Thread thread=Thread.currentThread(); ClassLoader classLoader=thread.getContextClassLoader(); return classLoader; }
java
public static ClassLoader getThreadContextClassLoader() { Thread thread=Thread.currentThread(); ClassLoader classLoader=thread.getContextClassLoader(); return classLoader; }
[ "public", "static", "ClassLoader", "getThreadContextClassLoader", "(", ")", "{", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "classLoader", "=", "thread", ".", "getContextClassLoader", "(", ")", ";", "return", "classLoade...
This function returns the thread context class loader. @return The thread context class loader
[ "This", "function", "returns", "the", "thread", "context", "class", "loader", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L30-L36
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.getType
public static Class<?> getType(String className) { ClassLoader classLoader=ReflectionHelper.getThreadContextClassLoader(); Class<?> type=null; try { //load class definition type=classLoader.loadClass(className); } catch(ClassNotFoundException e...
java
public static Class<?> getType(String className) { ClassLoader classLoader=ReflectionHelper.getThreadContextClassLoader(); Class<?> type=null; try { //load class definition type=classLoader.loadClass(className); } catch(ClassNotFoundException e...
[ "public", "static", "Class", "<", "?", ">", "getType", "(", "String", "className", ")", "{", "ClassLoader", "classLoader", "=", "ReflectionHelper", ".", "getThreadContextClassLoader", "(", ")", ";", "Class", "<", "?", ">", "type", "=", "null", ";", "try", ...
This function returns the class based on the class name. @param className The class name of the requested type @return The type
[ "This", "function", "returns", "the", "class", "based", "on", "the", "class", "name", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L45-L60
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.invokeMethod
public static Object invokeMethod(Class<?> type,Object instance,String methodName,Class<?>[] inputTypes,Object[] input) { Method method=null; try { //get method method=type.getDeclaredMethod(methodName,inputTypes); } catch(Exception exception) ...
java
public static Object invokeMethod(Class<?> type,Object instance,String methodName,Class<?>[] inputTypes,Object[] input) { Method method=null; try { //get method method=type.getDeclaredMethod(methodName,inputTypes); } catch(Exception exception) ...
[ "public", "static", "Object", "invokeMethod", "(", "Class", "<", "?", ">", "type", ",", "Object", "instance", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "inputTypes", ",", "Object", "[", "]", "input", ")", "{", "Method", "metho...
This function invokes the requested method. @param type The class type @param instance The instance @param methodName The method name to invoke @param inputTypes An array of input types @param input The method input @return The method output
[ "This", "function", "invokes", "the", "requested", "method", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L118-L146
train
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.getField
public static Field getField(Class<?> type,String fieldName) { Field field=null; try { //get field field=type.getDeclaredField(fieldName); } catch(Exception exception) { throw new FaxException("Unable to extract field: "+fieldName+"...
java
public static Field getField(Class<?> type,String fieldName) { Field field=null; try { //get field field=type.getDeclaredField(fieldName); } catch(Exception exception) { throw new FaxException("Unable to extract field: "+fieldName+"...
[ "public", "static", "Field", "getField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ")", "{", "Field", "field", "=", "null", ";", "try", "{", "//get field", "field", "=", "type", ".", "getDeclaredField", "(", "fieldName", ")", ";", ...
This function returns the field wrapper for the requested field @param type The class type @param fieldName The field name @return The field
[ "This", "function", "returns", "the", "field", "wrapper", "for", "the", "requested", "field" ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L157-L174
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java
ProcessFaxClientSpi.createProcessOutputValidator
protected ProcessOutputValidator createProcessOutputValidator() { //get process output validator String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.PROCESS_OUTPUT_VALIDATOR_PRE_FORMAT_PROPERTY_KEY); ProcessOutputValidator validator=null; if(className==null...
java
protected ProcessOutputValidator createProcessOutputValidator() { //get process output validator String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.PROCESS_OUTPUT_VALIDATOR_PRE_FORMAT_PROPERTY_KEY); ProcessOutputValidator validator=null; if(className==null...
[ "protected", "ProcessOutputValidator", "createProcessOutputValidator", "(", ")", "{", "//get process output validator", "String", "className", "=", "this", ".", "getConfigurationValue", "(", "FaxClientSpiConfigurationConstants", ".", "PROCESS_OUTPUT_VALIDATOR_PRE_FORMAT_PROPERTY_KEY"...
This function creates and returns the process output validator. @return The process output validator
[ "This", "function", "creates", "and", "returns", "the", "process", "output", "validator", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java#L281-L295
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java
ProcessFaxClientSpi.createProcessOutputHandler
protected ProcessOutputHandler createProcessOutputHandler() { //get process output handler String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.PROCESS_OUTPUT_HANDLER_PRE_FORMAT_PROPERTY_KEY); ProcessOutputHandler handler=null; if(className!=null) { ...
java
protected ProcessOutputHandler createProcessOutputHandler() { //get process output handler String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.PROCESS_OUTPUT_HANDLER_PRE_FORMAT_PROPERTY_KEY); ProcessOutputHandler handler=null; if(className!=null) { ...
[ "protected", "ProcessOutputHandler", "createProcessOutputHandler", "(", ")", "{", "//get process output handler", "String", "className", "=", "this", ".", "getConfigurationValue", "(", "FaxClientSpiConfigurationConstants", ".", "PROCESS_OUTPUT_HANDLER_PRE_FORMAT_PROPERTY_KEY", ")",...
This function creates and returns the process output handler. @return The process output handler
[ "This", "function", "creates", "and", "returns", "the", "process", "output", "handler", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java#L302-L314
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java
ProcessFaxClientSpi.executeProcess
protected ProcessOutput executeProcess(FaxJob faxJob,String command,FaxActionType faxActionType) { if(command==null) { this.throwUnsupportedException(); } //update command String updatedCommand=command; if(this.useWindowsCommandPrefix) { ...
java
protected ProcessOutput executeProcess(FaxJob faxJob,String command,FaxActionType faxActionType) { if(command==null) { this.throwUnsupportedException(); } //update command String updatedCommand=command; if(this.useWindowsCommandPrefix) { ...
[ "protected", "ProcessOutput", "executeProcess", "(", "FaxJob", "faxJob", ",", "String", "command", ",", "FaxActionType", "faxActionType", ")", "{", "if", "(", "command", "==", "null", ")", "{", "this", ".", "throwUnsupportedException", "(", ")", ";", "}", "//u...
Executes the process and returns the output. @param faxJob The fax job object @param command The command to execute @param faxActionType The fax action type @return The process output
[ "Executes", "the", "process", "and", "returns", "the", "output", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java#L467-L498
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxJob.java
AbstractFaxJob.getFilePath
public String getFilePath() { //get file File fileInstance=this.getFile(); String filePath=null; if(fileInstance!=null) { filePath=fileInstance.getPath(); } return filePath; }
java
public String getFilePath() { //get file File fileInstance=this.getFile(); String filePath=null; if(fileInstance!=null) { filePath=fileInstance.getPath(); } return filePath; }
[ "public", "String", "getFilePath", "(", ")", "{", "//get file", "File", "fileInstance", "=", "this", ".", "getFile", "(", ")", ";", "String", "filePath", "=", "null", ";", "if", "(", "fileInstance", "!=", "null", ")", "{", "filePath", "=", "fileInstance", ...
This function returns the path to the file to fax. @return The path to the file to fax
[ "This", "function", "returns", "the", "path", "to", "the", "file", "to", "fax", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxJob.java#L29-L41
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxJob.java
AbstractFaxJob.setFilePath
public void setFilePath(String filePath) { //create a new file File fileInstance=null; if(filePath!=null) { fileInstance=new File(filePath); } //set file this.setFile(fileInstance); }
java
public void setFilePath(String filePath) { //create a new file File fileInstance=null; if(filePath!=null) { fileInstance=new File(filePath); } //set file this.setFile(fileInstance); }
[ "public", "void", "setFilePath", "(", "String", "filePath", ")", "{", "//create a new file", "File", "fileInstance", "=", "null", ";", "if", "(", "filePath", "!=", "null", ")", "{", "fileInstance", "=", "new", "File", "(", "filePath", ")", ";", "}", "//set...
This function sets the path to the file to fax. @param filePath The path to the file to fax
[ "This", "function", "sets", "the", "path", "to", "the", "file", "to", "fax", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxJob.java#L49-L60
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxJob.java
AbstractFaxJob.addToStringAttributes
protected StringBuilder addToStringAttributes(String faxJobType) { //init buffer StringBuilder buffer=new StringBuilder(500); buffer.append(faxJobType); buffer.append(":"); //append values buffer.append(Logger.SYSTEM_EOL); buffer.append("ID: "); buffe...
java
protected StringBuilder addToStringAttributes(String faxJobType) { //init buffer StringBuilder buffer=new StringBuilder(500); buffer.append(faxJobType); buffer.append(":"); //append values buffer.append(Logger.SYSTEM_EOL); buffer.append("ID: "); buffe...
[ "protected", "StringBuilder", "addToStringAttributes", "(", "String", "faxJobType", ")", "{", "//init buffer", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", "500", ")", ";", "buffer", ".", "append", "(", "faxJobType", ")", ";", "buffer", ".", "app...
This function adds the common attributes for the toString printing. @param faxJobType The fax job type @return The buffer used
[ "This", "function", "adds", "the", "common", "attributes", "for", "the", "toString", "printing", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxJob.java#L69-L103
train
sagiegurari/fax4j
src/main/java/org/fax4j/spi/comm/CommFaxClientSpi.java
CommFaxClientSpi.createCommPortConnectionFactory
protected final CommPortConnectionFactory createCommPortConnectionFactory() { //create new instance CommPortConnectionFactory factory=(CommPortConnectionFactory)ReflectionHelper.createInstance(this.commConnectionFactoryClassName); //initialize factory.initialize(this); ...
java
protected final CommPortConnectionFactory createCommPortConnectionFactory() { //create new instance CommPortConnectionFactory factory=(CommPortConnectionFactory)ReflectionHelper.createInstance(this.commConnectionFactoryClassName); //initialize factory.initialize(this); ...
[ "protected", "final", "CommPortConnectionFactory", "createCommPortConnectionFactory", "(", ")", "{", "//create new instance", "CommPortConnectionFactory", "factory", "=", "(", "CommPortConnectionFactory", ")", "ReflectionHelper", ".", "createInstance", "(", "this", ".", "comm...
Creates and returns the COMM port connection factory. @return The COMM port connection factory
[ "Creates", "and", "returns", "the", "COMM", "port", "connection", "factory", "." ]
42fa51acabe7bf279e27ab3dd1cf76146b27955f
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/comm/CommFaxClientSpi.java#L191-L200
train