JarURLConnection
In this chapter you will learn:
Get the entry name
import java.net.JarURLConnection;
import java.net.URL;
// ja v a 2 s.co m
public class Main {
public static void main(String[] argv) throws Exception {
URL url = new URL("jar:file:/c://my.jar!/");
JarURLConnection conn = (JarURLConnection) url.openConnection();
String entryName = conn.getEntryName();
}
}
Next chapter...
What you will learn in the next chapter:
- How to encode space for URL
- Encode % percentage for URL
- Encode plus sign for URL
- URLEncoder: slashes
- Encode symbols for URL
Home » Java Tutorial » URL URI