Documentation on the java objects wfile, wrecord

4 views
Skip to first unread message

Søren

unread,
Mar 3, 2009, 1:37:39 PM3/3/09
to warc-tools
I'm currently looking at the java wrapper for warctools, and I have
successfully
built the java wrapper, and made the libwarc.so available to the
linker
to make it easier to use from eclipse.

But I can't any documentation on the wfile and wrecord objects
available through the java wrapper.

The only documentation I can find is indirectly in how the arguments
in the wrapper src-code are named and used.

And as Java programmer, that is not that informative

E.g. in the line (found in the contrib/java/src/Main.java):

wfile a = new wfile("./awanvl.warc", 600 * 1024 * 1024, 1, 0, ".");

What is the meaning of "600 * 1024 * 1024" (Maxsize of document?), and
the last three args:
1, 0, "."

WARC

unread,
Mar 3, 2009, 1:56:02 PM3/3/09
to warc-...@googlegroups.com
Hi Søren,

> wfile a = new wfile("./awanvl.warc", 600 * 1024 * 1024, 1, 0, ".");
>
> What is the meaning of "600 * 1024 * 1024" (Maxsize of document?), and
> the last three args:
> 1, 0, "."

They've the same mining as their C, Python and Ruby counter parts.
Just look to the examples under "app/" or "utest" dirs.

Regards
Younès

Soeren Vejrup Carlsen

unread,
Mar 4, 2009, 9:44:51 AM3/4/09
to warc-...@googlegroups.com
Ok, but then I want to create a new record, and set its recordtype:

wfile a = new wfile("/tmp/awanvl.warc", 600 * 1024 * 1024, 1, 0, "");
wrecord b = new wrecord();
b.WRecord_setRecordType(arg0, arg1)

The first argument of the WRecord_setRecordType method is a Pointer
variable. Where shall I get this Pointer variable from?

The second argument an int, which presumably
is 0 for unknown record type, 1 for info record, .. as listed in the
wrectype.h file

But it would be nice to have this enum available in the java interface
as well as the other enums
used by the C-applications.


/Søren

2009/3/3 WARC <voidp...@gmail.com>:
--
-----------------------------------------------------------
Søren Vejrup Carlsen
Gl. Kongevej 142, 1. tv.
DK-1850 Frederiksberg C

Mark Middleton

unread,
Mar 4, 2009, 1:12:24 PM3/4/09
to warc-...@googlegroups.com
Hi Søren

Many thanks for checking this out in detail, its really valuable to the project. Just a couple of points:

1. Can you create an issue in the tracking system for this and other problems or issues you may find. This is because we may not get around to things immediately and we don't want to lose anything in the group emails. The issue tracker is here... http://code.google.com/p/warc-tools/issues/list

2. If a rapid turnaround is required, you or any other Java programmers interested are welcome to submit patches to the project.

Many thanks
Mark at Hanzo
Reply all
Reply to author
Forward
0 new messages