Package org.apache.felix.gogo.command
Class Util
java.lang.Object
org.apache.felix.gogo.command.Util
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
private static final StringBuffer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
compareSubstring
(List<String> pieces, String s) static void
copy
(InputStream is, File dir, String destName, String destDir, byte[] buffer) static String
getBundleName
(org.osgi.framework.Bundle bundle) static <T> T
getService
(org.osgi.framework.BundleContext bc, Class<T> clazz, List<org.osgi.framework.ServiceReference<?>> refs) static String
getUnderlineString
(int len) static String
getValueString
(Object obj) parseSubstring
(String value) static String
resolveUri
(org.apache.felix.service.command.CommandSession session, String relativeUri) Intepret a string as a URI relative to the current working directory.static void
ungetServices
(org.osgi.framework.BundleContext bc, List<org.osgi.framework.ServiceReference<?>> refs) static void
unjar
(JarInputStream jis, File dir) static String
unparseSubstring
(List<String> pieces)
-
Field Details
-
CWD
- See Also:
-
m_sb
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getBundleName
-
getUnderlineString
-
getValueString
-
getService
-
ungetServices
public static void ungetServices(org.osgi.framework.BundleContext bc, List<org.osgi.framework.ServiceReference<?>> refs) -
unjar
- Throws:
IOException
-
copy
public static void copy(InputStream is, File dir, String destName, String destDir, byte[] buffer) throws IOException - Throws:
IOException
-
parseSubstring
-
unparseSubstring
-
compareSubstring
-
resolveUri
public static String resolveUri(org.apache.felix.service.command.CommandSession session, String relativeUri) throws IOException Intepret a string as a URI relative to the current working directory.- Parameters:
session
- the session (where the CWD is stored)relativeUri
- the input URI- Returns:
- the resulting URI as a string
- Throws:
IOException
-