/** * Checks to see if the command can be run. Typically used with something * like "myapp --version" to check to see if "myapp" is installed and on the * path. * * @param checkCmd the check command to run * @param errorValue what is considered an error value? * @return whether or not the check completed without error */ public static boolean check(String checkCmd, int... errorValue) { return check(new String[] { checkCmd }, errorValue); }
public Set<MediaType> getSupportedEmbedTypes(ParseContext context) { return getSupportedEmbedTypes(); }
/** * Starts a thread that reads and discards the contents of the standard * stream of the given process. Potential exceptions are ignored, and the * stream is closed once fully processed. * * @param process the process * param outputStream the output stream to send to standard error of the process */ private void sendStdErrToOutputStream( final Process process, final OutputStream outputStream) { multiThreadedStreamCopy(process.getErrorStream(), outputStream); }
commandMetadataSegments = getCommandMetadataSegments(metadata); commandSegment = commandSegment.replace( METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN, serializeMetadata(commandMetadataSegments)); cmd.set(i, commandSegment); sendStdErrToOutputStream(process, stdErrOutputStream); sendInputStreamToStdIn(inputStream, process); } else { sendStdOutToOutputStream(process, outputStream); } else { tmp.dispose();
for (Property property : getMetadataCommandArguments().keySet()) { if (metadataName.equals(property.getName())) { String[] metadataCommandArguments = getMetadataCommandArguments().get(property); if (metadataCommandArguments != null) { for (String metadataCommandArgument : metadataCommandArguments) {
commandMetadataSegments = getCommandMetadataSegments(metadata); commandSegment = commandSegment.replace( METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN, serializeMetadata(commandMetadataSegments)); cmd.set(i, commandSegment); sendStdErrToOutputStream(process, stdErrOutputStream); sendInputStreamToStdIn(inputStream, process); } else { sendStdOutToOutputStream(process, outputStream); } else { tmp.dispose();
for (Property property : getMetadataCommandArguments().keySet()) { if (metadataName.equals(property.getName())) { String[] metadataCommandArguments = getMetadataCommandArguments().get(property); if (metadataCommandArguments != null) { for (String metadataCommandArgument : metadataCommandArguments) {
commandMetadataSegments = getCommandMetadataSegments(metadata); commandSegment = commandSegment.replace( METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN, serializeMetadata(commandMetadataSegments)); cmd.set(i, commandSegment); sendStdErrToOutputStream(process, stdErrOutputStream); sendInputStreamToStdIn(inputStream, process); } else { sendStdOutToOutputStream(process, outputStream); } else { tmp.dispose();
/** * Sends the contents of the given input stream to the * standard input of the given process. Potential exceptions are * ignored. * <p> * Note that the given input stream is <em>not</em> closed by this method. * * @param process the process * @param inputStream the input stream to send to standard input of the process */ private void sendInputStreamToStdIn( final InputStream inputStream, final Process process) { multiThreadedStreamCopy(inputStream, process.getOutputStream()); }
/** * Checks to see if the command can be run. Typically used with something * like "myapp --version" to check to see if "myapp" is installed and on the * path. * * @param checkCmd the check command to run * @param errorValue what is considered an error value? * @return whether or not the check completed without error */ public static boolean check(String checkCmd, int... errorValue) { return check(new String[] { checkCmd }, errorValue); }
public Set<MediaType> getSupportedEmbedTypes(ParseContext context) { return getSupportedEmbedTypes(); }
for (Property property : getMetadataCommandArguments().keySet()) { if (metadataName.equals(property.getName())) { String[] metadataCommandArguments = getMetadataCommandArguments().get(property); if (metadataCommandArguments != null) { for (String metadataCommandArgument : metadataCommandArguments) {
/** * Starts a thread that reads and discards the contents of the standard * stream of the given process. Potential exceptions are ignored, and the * stream is closed once fully processed. * * @param process the process * param outputStream the output stream to send to standard error of the process */ private void sendStdErrToOutputStream( final Process process, final OutputStream outputStream) { multiThreadedStreamCopy(process.getErrorStream(), outputStream); }
/** * Checks to see if the command can be run. Typically used with something * like "myapp --version" to check to see if "myapp" is installed and on the * path. * * @param checkCmd the check command to run * @param errorValue what is considered an error value? * @return whether or not the check completed without error */ public static boolean check(String checkCmd, int... errorValue) { return check(new String[] { checkCmd }, errorValue); }
public Set<MediaType> getSupportedEmbedTypes(ParseContext context) { return getSupportedEmbedTypes(); }
/** * Starts a thread that reads and discards the contents of the standard * stream of the given process. Potential exceptions are ignored, and the * stream is closed once fully processed. * * @param process the process * param outputStream the output stream to send to standard error of the process */ private void sendStdErrToOutputStream( final Process process, final OutputStream outputStream) { multiThreadedStreamCopy(process.getErrorStream(), outputStream); }
/** * Sends the contents of the given input stream to the * standard input of the given process. Potential exceptions are * ignored. * <p> * Note that the given input stream is <em>not</em> closed by this method. * * @param process the process * @param inputStream the input stream to send to standard input of the process */ private void sendInputStreamToStdIn( final InputStream inputStream, final Process process) { multiThreadedStreamCopy(inputStream, process.getOutputStream()); }
/** * Sends the contents of the given input stream to the * standard input of the given process. Potential exceptions are * ignored. * <p> * Note that the given input stream is <em>not</em> closed by this method. * * @param process the process * @param inputStream the input stream to send to standard input of the process */ private void sendInputStreamToStdIn( final InputStream inputStream, final Process process) { multiThreadedStreamCopy(inputStream, process.getOutputStream()); }