<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>Ciao a
tutti,</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>non uso direttamente
python ma lo uso indirettamente da WLST (weblogic scripting
tool).</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>Ho un array di bytes
da scrivere in un file binario, il codice è il seguente:</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial color=#0000ff
size=2>fileName = 'my.jar'</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT color=#0000ff><FONT size=2><FONT
face=Arial>bytes = ...</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT size=2><FONT face=Arial
color=#0000ff>file = open(fileName, </FONT><I><FONT face=Arial
color=#0000ff>'wb'</FONT></I><FONT face=Arial
color=#0000ff>)</FONT></FONT></DIV>
<DIV align=left><FONT size=2><FONT face=Arial color=#0000ff>file.write(<SPAN
class=582162112-01102007>String</SPAN>(</FONT><FONT face=Arial
color=#0000ff>bytes))</FONT></FONT></DIV>
<DIV align=left><FONT face=Arial color=#0000ff size=2>file.close()</FONT></DIV>
<DIV><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>ma se faccio una
verifica sul file prodotto:</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2><FONT
color=#0000ff>jar tvf my.jar<BR>java.util.zip.ZipException: too many length or
distance symbols<BR> at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)<BR>
at
java.util.zip.ZipInputStream.read(ZipInputStream.java:139)<BR>
at
java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)<BR>
at
sun.tools.jar.Main.list(Main.java:743)<BR>
at
sun.tools.jar.Main.run(Main.java:191)<BR>
at sun.tools.jar.Main.main(Main.java:903)</FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>Quale dovrebbe
essere l'approccio corretto?</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial size=2>Vi
ringrazio</FONT></SPAN></DIV>
<DIV><SPAN class=582162112-01102007><FONT face=Arial
size=2>ferp</FONT></SPAN></DIV>
<DIV> </DIV></BODY></HTML>
<p>
IMPORTANT: <br>
This e-mail transmission is intended for the named <br>
addressee(s)only. <br>
Its contents are private, confidential and protected <br>
from disclosure and should not be read, copied or<br>
disclosed by any other person. <br>
If you are not the intended recipient, we kindly ask<br>
you to notify the sender immediately by telephone <br>
(+41 (0)58 806 50 00), to redirect the message to the <br>
account "info@b-source.ch" and to delete this e-mail.<br>
E-mail transmissions may be intercepted, altered or <br>
read by unauthorized persons and may contain viruses.<br>
Therefore, it is recommended that you use regular mail<br>
or courier services for any information intended to be <br>
confidential. However, by sending us messages through<br>
e-mail, you authorize and instruct us to correspond by <br>
e-mail in the relevant matter. <br>
Thank you.<br>
<br>
</p>