3import java.io.BufferedReader;
4import java.io.IOException;
5import java.io.InputStreamReader;
6import java.net.JarURLConnection;
7import java.net.URLConnection;
9import org.jau.io.IOUtil;
10import org.jau.net.AssetURLConnection;
11import org.jau.net.Uri;
12import org.jau.sys.AndroidVersion;
13import org.junit.Assert;
15import jau.test.junit.util.JunitTracer;
28 protected static final Uri.Encoded
test_asset_test2_rel = Uri.Encoded.cast(
"data/AssetURLConnectionTest.txt");
41 protected static void testAssetConnection(
final URLConnection c,
final String entry_name)
throws IOException {
42 Assert.assertNotNull(c);
43 if(c instanceof AssetURLConnection) {
44 final AssetURLConnection ac = (AssetURLConnection) c;
45 Assert.assertEquals(entry_name, ac.getEntryName());
46 }
else if(c instanceof JarURLConnection) {
47 final JarURLConnection jc = (JarURLConnection) c;
48 if(AndroidVersion.isAvailable) {
49 Assert.assertEquals(
"assets/"+entry_name, jc.getEntryName());
51 Assert.assertEquals(entry_name, jc.getEntryName());
55 final BufferedReader reader =
new BufferedReader(
new InputStreamReader(c.getInputStream()));
59 while ((line = reader.readLine()) !=
null) {
60 System.err.println(c.getURL()+
":"+l+
"> "+line);
64 IOUtil.close(reader,
false);
static final String test_asset_test1_url
In gluegen.test.jar.
static final String test_asset_test3a_url
static final String test_asset_rt2_url
static final String test_asset_test4_entry
static final String test_asset_rt_entry
static final String test_asset_test4a_url
static final String test_asset_rt_url
In jaulib_base.jar.
static final String test_asset_test4b_url
static final Uri.Encoded test_asset_test4_rel
static final String test_asset_test2_entry
static final String test_asset_test3b_url
static final Uri.Encoded test_asset_test2_rel
static final String test_asset_test3_entry
static void testAssetConnection(final URLConnection c, final String entry_name)
static final String test_asset_test2a_url
static final String test_asset_test2b_url
static final Uri.Encoded test_asset_test3_rel
static final String test_asset_test1_entry