[sane-devel] Pure java sane interface

Andi McLean andi at pandagrove.co.uk
Fri Nov 17 09:45:46 CET 2006


I'm the maintainer / author of JSane.
I've been meaning to release JSane under the lgpl but not had time to alter 
the comments, sourceforge etc.

If you wish to use JSane, under the LGPL you have my permission to do so.
If you need written permission e-mail me  andi at pandagrove dot co dot uk
and we'll sort something out.

Cheers
Andi

BTW pointers and strings do get a little messy when using SANED.



On Thursday 16 November 2006 22:58, andy wrote:
> Hello
>
> I have been looking for a lgpl interface to sane from java.
>
> I have seen jsane and scanlite but I cant use them as they are not lgpl.
>
> So yesterday I started writing a pure java sane interface, I have
> already got it to scan a document and save it as a png file, cool, sane
> is quite simple!
>
> My plan is to call it sane4j and release it on sourceforge as lgpl,
> unless anyone knows of an existing lgpl java-sane interface.
>
> I connect to saned, Init, open, start, close and exit are working.
>
> However I have some problems with the protocol for commands like
> getDevices and getOptionDescriptor. I think it maybe something to do
> with my string decode routine (below).
>
> The other thing I dont understand is the way pointers are transmitted.
>
> Can someone explain how **ptr would be sent please.
>
> Thanks in advance
>
> Andy Bailey
>
>
> public String readString() throws IOException
> 	{
> 		String s=null;
> 		int len=in.readInt();
> 		System.out.println("String of length "+len);
> 		if (len==0)
> 		{
> 			return null;
> 		}
> 		else if (len==1)
> 		{
> 			s="";
> 		}
> 		else
> 		{
> 			byte buf[]=new byte[len-1];
> 			in.readFully(buf);
> 			s=new String(buf);
>
> 		}
> 		byte nul = in.readByte();
> 		//assert nul==0;
> 		return s;
> 	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061117/ec7616c6/attachment.pgp


More information about the sane-devel mailing list