| | |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | |
| | | import java.io.PrintStream; |
| | | import java.net.SocketTimeoutException; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.DN; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | |
| | | controlCriticality = false; |
| | | } else |
| | | { |
| | | err.println("Invalid format for criticality value:" + remainder); |
| | | printWrappedText(err, "Invalid format for criticality value:" + remainder); |
| | | return null; |
| | | } |
| | | return new LDAPControl(controlOID, controlCriticality); |
| | |
| | | controlCriticality = false; |
| | | } else |
| | | { |
| | | err.println("Invalid format for criticality value:" + critical); |
| | | printWrappedText(err, "Invalid format for criticality value:" + critical); |
| | | return null; |
| | | } |
| | | |
| | |
| | | // Ensure all the bytes have been read in |
| | | if (offset < val.length) |
| | | { |
| | | err.println("Could not completely read file "+filePath); |
| | | printWrappedText(err, ERR_FILE_NOT_FULLY_READABLE.get(filePath)); |
| | | return null; |
| | | } |
| | | |