Re: Handle Byte Array

"Dominik Karall" <[email protected]>
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
2007/5/23, Lars Kühne <[email protected]>:
> On 5/23/07, Dominik Karall wrote:
> > Does checkstyle provide an interface for reading from a byte array
> > instead of handling java File for checking?
>
> No, but this is an open feature request (#737698). Note that you could
> wrap your byte[] inside a ByteArrayInputStream and use the suggested
> API.
>
> There is only one slight complication, and that is that some checks
> (e.g. Translation or PackageHtml) look at neighbor files in the file
> system to do their thing, so the "pass in a set of streams" idea is a
> bit too simplistic, maybe something like apache commons vfs is
> required.
>
> > Because I want to include the checker in a project which should scan
> > byte arrays instead of files. If checkstyle doesn't provide such an
> > interface, is there any java possibility to use the byte[] as a File
> > (without creating one)?
>
> No, that's not possible.

Hi Lars!

Thanks for your answer! Which API do you mean? I couldn't find the one
which should handle ByteArrayInputStream.

thanks,
dominik

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.