- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
public BUILDER path( final ContentPath path ) { this.parentPath = path.getParentPath() != null ? path.getParentPath().asAbsolute() : null; Preconditions.checkArgument( path.elementCount() > 0, "No content can be \"root content\": " + path.toString() ); this.name = ContentName.from( path.getElement( path.elementCount() - 1 ) ); return (BUILDER) this; }
private static String getPathStartedSomeLevelsHigher( final Content content, final String path ) { int levels = getNumberOfLevelsToAscend( path ); ContentPath contentPath = content.getPath(); for ( int level = 1; level <= levels; level++ ) { contentPath = contentPath.getParentPath(); if ( contentPath.isRoot() ) { return path.substring( levels * 3 ); } } return contentPath.toString() + "/" + path.substring( levels * 3 ); }
final ContentPath targetParent = targetPath.getParentPath(); if ( targetParent.equals( sourcePath.getParentPath() ) )