|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jacoco.core.internal.analysis.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 |
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
| Constructor Detail |
|---|
public ContentTypeDetector(InputStream in)
throws IOException
getInputStream().
in - input to read the header from
IOException| Method Detail |
|---|
public InputStream getInputStream()
public int getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||