|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.LDAPToolUtils
public class LDAPToolUtils
This class provides utility functions for all the client side tools.
Constructor Summary | |
---|---|
LDAPToolUtils()
|
Method Summary | |
---|---|
static LDAPControl |
getControl(java.lang.String argString,
java.io.PrintStream err)
Parse the specified command line argument to create the appropriate LDAPControl. |
static void |
printErrorMessage(java.io.PrintStream err,
Message explanation,
int resultCode,
Message errorMessage,
DN matchedDN)
Prints a multi-line error message with the provided information to the given print stream. |
static byte[] |
readBytesFromFile(java.lang.String filePath,
java.io.PrintStream err)
Read the data from the specified file and return it in a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPToolUtils()
Method Detail |
---|
public static LDAPControl getControl(java.lang.String argString, java.io.PrintStream err)
argString
- The argument string containing the encoded control
information.err
- A print stream to which error messages should be
written if a problem occurs.
null
if an error occurs while parsing the argument value.public static byte[] readBytesFromFile(java.lang.String filePath, java.io.PrintStream err) throws java.io.IOException
filePath
- The path to the file that should be read.err
- A print stream to which error messages should be
written if a problem occurs.
java.io.IOException
- If a problem occurs while trying to read the
specified file.public static void printErrorMessage(java.io.PrintStream err, Message explanation, int resultCode, Message errorMessage, DN matchedDN)
err
- The print stream to use to write the error message.explanation
- The general explanation to provide to the user, or
null
if there is none.resultCode
- The result code returned from the server, or -1 if
there is none.errorMessage
- The additional information / error message returned
from the server, or null
if there was none.matchedDN
- The matched DN returned from the server, or
null
if there was none.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |