List of usage examples for com.amazonaws.util StringUtils beginsWithIgnoreCase
public static boolean beginsWithIgnoreCase(final String data, final String seq)
From source file:com.netflix.genie.core.services.impl.LocalFileTransferImpl.java
License:Apache License
private Path createFilePath(final String path) throws GenieServerException { log.debug("Normalizing path from {}", path); final String finalPath; if (StringUtils.beginsWithIgnoreCase(path, ENTIRE_FILE_SCHEME)) { finalPath = path;//from ww w. j a v a2 s.c o m } else if (StringUtils.beginsWithIgnoreCase(path, FILE_SCHEME)) { finalPath = path.replace(FILE_SCHEME, ENTIRE_FILE_SCHEME); } else { finalPath = ENTIRE_FILE_SCHEME + path; } log.debug("Final path of {} after normalization is {}", path, finalPath); try { return Paths.get(new URI(finalPath)); } catch (final IllegalArgumentException | URISyntaxException e) { log.error("Unable to convert {} to java.nio.file.Path due to {}", finalPath, e.getMessage(), e); throw new GenieServerException("Failed to get file path", e); } }