null if there are no matches.
@stable ICU 3.4
NULL.
@throws java.io.IOException in case of I/O error.
The cracked blade will be marked as such, and this method will return {@code true}. A determination as to which blade has failed can then by made by querying the {@link Blade}s. @param bladeA first blade for consideration @param bladeB second blade for consideration @return {@code true} if one or both blades are believed to becracked
null, in which case only the given document metadata is used for type detection. If the document stream supports the {@link InputStream#markSupported() mark feature}, then the stream is marked and reset to the original position before this method returns. Only a limited number of bytes are read from the stream.
The given document stream is not closed by this method.
Unlike in the {@link #parse(InputStream,Metadata)} method, thegiven document metadata is not modified by this method.
@param stream the document stream, or null
@param metadata document metadata
@return detected media type
@throws IOException if the stream can not be read
application/octet-stream if the type of the document can not be detected. If the document input stream is not available, then the first argument may be null. Otherwise the detector may read bytes from the start of the stream to help in type detection. The given stream is guaranteed to support the {@link InputStream#markSupported() mark feature} and the detectoris expected to {@link InputStream#mark(int) mark} the stream beforereading any bytes from it, and to {@link InputStream#reset() reset}the stream before returning. The stream must not be closed by the detector.
The given input metadata is only read, not modified, by the detector.
@param input document input stream, or null
@param metadata input metadata for the document
@return detected media type, or application/octet-stream
@throws IOException if the document input stream could not be read
null
@param metadata ignored
@return "text/plain" if the input stream suggest a text document,"application/octet-stream" otherwise
The given stream is expected to support marks, so that this method can reset the stream to the position it was in before this method was called.
@param input document stream, or null
@param metadata metadata hints
@return MIME type of the document
@throws IOException if the document stream could not be read
null if there are no matches.
@stable ICU 3.4
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |