|
@@ -67,5 +67,23 @@ public class CHttpHandlerTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ public void testBinary() throws IOException, URISyntaxException {
|
|
|
|
|
+ URIResolver r = new URIResolver().register(CHttpHandler.THAT);
|
|
|
|
|
+ URIHandle h4 = r.resolve("http://maven.ranides.net/net/ranides/assira/0.58/assira-0.58.jar.sha1");
|
|
|
|
|
+
|
|
|
|
|
+ System.out.printf("uri = %s%n", h4.uri());
|
|
|
|
|
+ System.out.printf("charset = %s%n", h4.charset());
|
|
|
|
|
+ System.out.printf("exists = %s%n", h4.exists());
|
|
|
|
|
+ System.out.printf("flags = %s%n", h4.flags());
|
|
|
|
|
+ System.out.printf("stream = %s%n", IOStrings.read(h4.istream(10, 15), h4.charset()));
|
|
|
|
|
+ System.out.printf("reader = %s%n", IOStrings.read(h4.reader()).length());
|
|
|
|
|
+ System.out.printf("time = %s%n", h4.time(URITime.MODIFIED));
|
|
|
|
|
+ System.out.printf("size = %s%n", h4.size());
|
|
|
|
|
+ System.out.printf("%n");
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|