Attaching a (failing) unit test and a sample file indicating the problem even though I am wrapping the stream in a TikaInputStream.
On Thu, Jun 18, 2015 at 8:55 PM, Jukka Zitting <[email protected]> wrote: > Hi, > > 2015-06-18 8:28 GMT-04:00 Satya Deep Maheshwari <[email protected]>: > > I think there is an assumption in Tika's MagicDetector that the stream > would always support mark/reset. > > That assumption is based on the Detector API [1], which states that a > stream passed to detect() should support the mark feature. > > As suggested by Nick, an easy way to meet that API contract is for the > client to wrap a stream into TikaInputStream before passing it to the > detector. > > [1] > http://tika.apache.org/1.8/api/org/apache/tika/detect/Detector.html#detect(java.io.InputStream,%20org.apache.tika.metadata.Metadata) > > BR, > > Jukka Zitting >
this-is-actually-a-wav-file.mp3
Description: audio/mpeg
TikaDetectorTest.java
Description: Binary data
