public class URLTester extends Object
HttpTester instead.| Constructor and Description |
|---|
URLTester() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertContains(String urlString,
String needle) |
static void |
assertExists(String urlString) |
static void |
assertNotExists(String urlString) |
static void |
assertNotFound(String urlString) |
static String |
getContent(String urlString) |
static String |
getContent(String urlString,
long firstBytePosition)
Requests and returns partial http content starting at a specific position.
|
static String |
getContent(String urlString,
long firstBytePosition,
long lastBytePosition)
Requests and returns partial http content starting and ending at specific positions.
|
static Map<String,List<String>> |
getHeaderFields(String urlString)
Returns all header fields values.
|
public static void assertExists(String urlString) throws IOException
IOExceptionpublic static void assertNotFound(String urlString) throws IOException
IOExceptionpublic static void assertNotExists(String urlString) throws IOException
IOExceptionpublic static String getContent(String urlString) throws IOException
IOExceptionpublic static String getContent(String urlString, long firstBytePosition) throws IOException
Untested!
Reads until the end of the stream.
urlString - firstBytePosition - IOExceptionpublic static String getContent(String urlString, long firstBytePosition, long lastBytePosition) throws IOException
Untested!
Behaves like getContent(String,long) if
lastBytePosition <= firstBytePosition.
urlString - firstBytePosition - starting at 0lastBytePosition - starting at 0IOExceptionpublic static Map<String,List<String>> getHeaderFields(String urlString) throws IOException
urlString - IOExceptionpublic static void assertContains(String urlString, String needle) throws IOException
IOExceptionCopyright © 2016 Github jjYBdx4IL Projects. All rights reserved.