Package com.google.gerrit.pgm.init.api
Class InitUtil
- java.lang.Object
- 
- com.google.gerrit.pgm.init.api.InitUtil
 
- 
 public class InitUtil extends Object Utility functions to help initialize a site.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(Path dst, byte[] buf)static Diedie(String why)static Diedie(String why, Throwable cause)static StringdnOf(String name)static StringdomainOf(String name)static voidextract(Path dst, Class<?> sibling, String name)static Stringhostname()static booleanisAnyAddress(URI u)static booleanisLocal(String hostname)static voidmkdir(File file)static voidmkdir(Path path)static intportOf(URI uri)static voidsavePublic(org.eclipse.jgit.storage.file.FileBasedConfig sec)static URItoURI(String url)static Stringusername()static Stringversion()
 
- 
- 
- 
Method Detail- 
savePublicpublic static void savePublic(org.eclipse.jgit.storage.file.FileBasedConfig sec) throws IOException- Throws:
- IOException
 
 - 
mkdirpublic static void mkdir(File file) 
 - 
mkdirpublic static void mkdir(Path path) 
 - 
versionpublic static String version() 
 - 
usernamepublic static String username() 
 - 
hostnamepublic static String hostname() 
 - 
isLocalpublic static boolean isLocal(String hostname) 
 - 
extractpublic static void extract(Path dst, Class<?> sibling, String name) throws IOException - Throws:
- IOException
 
 - 
copypublic static void copy(Path dst, byte[] buf) throws FileNotFoundException, IOException - Throws:
- FileNotFoundException
- IOException
 
 - 
toURIpublic static URI toURI(String url) throws URISyntaxException - Throws:
- URISyntaxException
 
 - 
isAnyAddresspublic static boolean isAnyAddress(URI u) 
 - 
portOfpublic static int portOf(URI uri) 
 
- 
 
-