|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jacoco.core.internal.ContentTypeDetector
public class ContentTypeDetector
Detector for content types of binary streams based on a magic headers.
| Field Summary | |
|---|---|
static int |
CLASSFILE
File type Java class |
static int |
GZFILE
File type GZIP compressed Data |
static int |
PACK200FILE
File type Pack200 archive |
static int |
UNKNOWN
Unknown file type |
static int |
ZIPFILE
File type ZIP archive |
| Constructor Summary | |
|---|---|
ContentTypeDetector(InputStream in)
Creates a new detector based on the given input. |
|
| Method Summary | |
|---|---|
InputStream |
getInputStream()
Returns an input stream instance to read the complete content (including the header) of the underlying stream. |
int |
getType()
Returns the detected file type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int CLASSFILE
public static final int ZIPFILE
public static final int GZFILE
public static final int PACK200FILE
| Constructor Detail |
|---|
public ContentTypeDetector(InputStream in)
throws IOException
getInputStream().
in - input to read the header from
IOException - if the stream can't be read| Method Detail |
|---|
public InputStream getInputStream()
public int getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||