You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Scott Carey <sc...@apache.org> on 2011/10/04 04:12:51 UTC

Re: In Java, how can I create an equivalent of an Apache Avro container file without being forced to use a File as a medium?

In addition to Joe's comments:

On the write side, DataFileWriter.create() can take a file or an output
stream.
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/DataFileWrit
er.html

On the read side, DataFileStream can be used if the input does not have
random access and can be represented with an InputStream.
If the input has random access, implement SeekableInput and then construct a
DataFileReader with it:
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/SeekableInpu
t.html
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/DataFileRead
er.html


On 9/24/11 2:14 AM, "Bernard Liang" <li...@gmail.com> wrote:

> Hello,
> 
> This is somewhat of a more advanced question regarding the Java implementation
> of Avro. The details are located at the following link:
> 
> http://stackoverflow.com/questions/7537959/in-java-how-can-i-create-an-equival
> ent-of-an-apache-avro-container-file-without
> 
> If there is anyone that might be able to assist me with this, I would like to
> get in contact with you.
> 
> Best regards,
> Bernard Liang