# Problems reading a server file through the internet

mop21299 (mop21299@mail.telepac.pt)
Sat, 14 Mar 1998 15:03:43 -0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: CDM Direct: "Never Forget An Important Occasion Again !!!"
- Previous message: Margabandhu Prasad: "(no subject)"
- Next in thread: Marianne Mueller: "Re: Problems reading a server file through the internet"

    From: "mop21299" <mop21299@mail.telepac.pt>

    To: <java-security@web4.javasoft.com>

    Subject: Problems reading a server file through the internet

    Date: Sat, 14 Mar 1998 15:03:43 -0100

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01BD4F5A.80CB4CE0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0016_01BD4F5A.80CB4CE0"

------=_NextPart_001_0016_01BD4F5A.80CB4CE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello, there...
=20
I'm writing this few words to ask for help.
I'm trying to bild a homepage providing some useful and simple technical =
analisys tools for the portuguese stock market.
In order to make things work i've used 3 files for data arquives: *.icc, =
*.ist, *.iua.
Those 3 files are suposed to be open by gportucel.java, wich is a window =
opened by portucel.java.
But the problem is with gportucel.java, beginning at line 45, when it's =
trying to make a connection with the host machine, allways repporting a =
Security Error.
I have already read carefully the examples that I have downloaded with =
JDK - Vs. 1.1.4, but stil I just can=B4t find a solution.
If it isn=B4t to much trouble for you, I will apreciate very much an =
answer to my problem, at least saying where can I find some similar =
applets reporting the subject and solving the problem.
I'm sorry for the inconvenient that may cause you the fact I'm sending =
you all the files for one stock example, but it seemed to me the only =
way to make your work easier and to make possible for you to understand =
wich errors am I making.
Thank's for your attention.
=20
Best regards
=20

Jos=E9 Rodrigues

------=_NextPart_001_0016_01BD4F5A.80CB4CE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
Hello, there...
I'm writing this few words to ask = for=20 help.
I'm trying to bild a homepage = providing some=20 useful and simple technical analisys tools for the portuguese stock=20 market.
In order to make things work i've = used 3 files=20 for data arquives: *.icc, *.ist, *.iua.
Those 3 files are suposed to be open by = gportucel.java, wich=20 is a window opened by portucel.java.
But the problem is with gportucel.java, beginning at = line 45,=20 when it's trying to make a connection with the host machine, allways = repporting=20 a Security Error.
I have already read carefully the examples that I = have=20 downloaded with JDK - Vs. 1.1.4, but stil I just can´t find a=20 solution.
If it isn´t to much trouble for you, I will = apreciate=20 very much an answer to my problem, at least saying where can I find some = similar=20 applets reporting the subject and solving the problem.
I'm sorry for the inconvenient that may cause you = the fact I'm=20 sending you all the files for one stock example, but it seemed to me the = only=20 way to make your work easier and to make possible for you to understand = wich=20 errors am I making.
Thank's for = your=20 attention.
Best regards
José Rodrigues
------=_NextPart_001_0016_01BD4F5A.80CB4CE0-- ------=_NextPart_000_0015_01BD4F5A.80CB4CE0 Content-Type: application/octet-stream; name="bportucel.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="bportucel.java" /* balanco e dr */ import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class bportucel extends Applet { Color v1 =3D new Color(0,150,0); Color v2 =3D new Color(0,220,0); Color v3 =3D new Color(0,255,0); Color am1 =3D new Color(255,0,150); Color am2 =3D new Color(255,0,220); Color am3 =3D new Color(255,175,175); Color az1 =3D new Color(0,0,90); Color az2 =3D new Color(0,0,130); Color az3 =3D new Color(0,0,200); Color az4 =3D new Color(100,0,255); Color az5 =3D new Color(0,50,255); Color az6 =3D new Color(0,100,255); Color az7 =3D new Color(0,255,255); Color e1 =3D new Color(110,0,0); Color e2 =3D new Color(180,0,0); Color e3 =3D new Color(255,0,0); Color e4 =3D new Color(255,100,0); float imob, divdt, actc, stlq, divat, passc, cmv, cp, oco, cf, cext, imp, reslq, vn, opo, pf, pext, atotal, dtotal; int ypos; public void init() { imob =3D 117143.0f; divdt =3D 0.0f; actc =3D 24448.0f; atotal =3D 141591.0f; stlq =3D 96777.0f; divat =3D 35054.0f; passc =3D 9759.0f; cmv =3D 36694.0f; cp =3D 6657.0f; oco =3D 6971.0f; cf =3D 2545.0f; cext =3D 307.0f; imp =3D 2.0f; reslq =3D -1371.0f; dtotal =3D 51804.0f; vn =3D 46852.0f; opo =3D 2734.0f; pf =3D 1713.0f; pext =3D 505.0f; if (reslq<0) dtotal =3D dtotal - reslq; repaint(); } public void paint(Graphics g) { g.setColor(Color.white); g.fillRect(0,0,600,180); ypos =3D 26; g.setColor(v1); g.fillRect(300,2,8,8); g.fillRect(4,ypos,63,Math.round(124*imob/atotal)); ypos +=3D Math.round(124*imob/atotal); g.setColor(v2); g.fillRect(300,12,8,8); g.fillRect(4,ypos,63,Math.round(124*divdt/atotal)); ypos +=3D Math.round(124*divdt/atotal); g.setColor(v3); g.fillRect(300,22,8,8); g.fillRect(4,ypos,63,Math.round(124*actc/atotal)); ypos =3D 26; g.setColor(am1); g.fillRect(300,32,8,8); g.fillRect(67,ypos,63,Math.round(124*stlq/atotal)); ypos +=3D Math.round(124*stlq/atotal); g.setColor(am2); g.fillRect(300,42,8,8); g.fillRect(67,ypos,63,Math.round(124*divat/atotal)); ypos +=3D Math.round(124*divat/atotal); g.setColor(am3); g.fillRect(300,52,8,8); g.fillRect(67,ypos,63,Math.round(124*passc/atotal)); =20 ypos =3D 26; g.setColor(az1); g.fillRect(300,62,8,8); g.fillRect(139,ypos,63,Math.round(124*cmv/dtotal)); ypos +=3D Math.round(124*cmv/dtotal); g.setColor(az2); g.fillRect(300,72,8,8); g.fillRect(139,ypos,63,Math.round(124*cp/dtotal)); ypos +=3D Math.round(124*cp/dtotal); g.setColor(az3); g.fillRect(300,82,8,8); g.fillRect(139,ypos,63,Math.round(124*oco/dtotal)); ypos +=3D Math.round(124*oco/dtotal); g.setColor(az4); g.fillRect(300,92,8,8); g.fillRect(139,ypos,63,Math.round(124*cf/dtotal)); ypos +=3D Math.round(124*cf/dtotal); g.setColor(az5); g.fillRect(300,102,8,8); g.fillRect(139,ypos,63,Math.round(124*cext/dtotal)); ypos +=3D Math.round(124*cext/dtotal); g.setColor(az6); g.fillRect(300,112,8,8); g.fillRect(139,ypos,63,Math.round(124*imp/dtotal)); ypos +=3D Math.round(124*imp/dtotal); g.setColor(az7); g.fillRect(300,122,8,8); if (reslq >=3D 0) g.fillRect(139,ypos,63,Math.round(124*reslq/dtotal)); ypos =3D 26; g.setColor(e1); g.fillRect(300,132,8,8); g.fillRect(202,ypos,63,Math.round(124*vn/dtotal)); ypos +=3D Math.round(124*vn/dtotal); g.setColor(e2); g.fillRect(300,142,8,8); g.fillRect(202,ypos,63,Math.round(124*opo/dtotal)); ypos +=3D Math.round(124*opo/dtotal); g.setColor(e3); g.fillRect(300,152,8,8); g.fillRect(202,ypos,63,Math.round(124*pf/dtotal)); ypos +=3D Math.round(124*pf/dtotal); g.setColor(e4); g.fillRect(300,162,8,8); g.fillRect(202,ypos,63,Math.round(124*pext/dtotal)); ypos +=3D Math.round(124*pext/dtotal); g.setColor(az7); if (reslq < 0) g.fillRect(202,ypos,63,Math.round((-124)*reslq/dtotal)); g.setColor(Color.black); g.drawString("BALANCO",42,10); g.drawString("Activo",21,25); g.drawString("Passivo",77,25); g.drawString("DEM.RESULTADOS",145,10); g.drawString("Custos",150,25); g.drawString("Proveitos",208,25); g.drawRect(4,12,126,14); g.drawRect(138,12,126,14); g.drawRect(4,26,126,124); g.drawLine(67,12,67,150); g.drawRect(138,26,126,124); g.drawLine(201,12,201,150); g.drawString("Imobilizado",320,12); g.drawString("Dividas de terceiros a MLP",320,22); g.drawString("Activo Circulante",320,32); g.drawString("Situacao Liquida",320,42); g.drawString("Dividas a terceiros a MLP",320,52); g.drawString("Passivo Circulante",320,62); g.drawString("Custo Merc.Vend.Mat.Cons.+ Forn.Servicos = Ext.",320,72); g.drawString("Custos com o Pessoal",320,82); g.drawString("Outros Custos Operacionais",320,92); g.drawString("Custos Financeiros",320,102); g.drawString("Custos Extraordinarios",320,112); g.drawString("Imposto s/ Rendimento do Exercicio",320,122); g.drawString("Resultado Liquido",320,132); g.drawString("Volume de Negocios",320,142); g.drawString("Outros Proveitos Operacionais",320,152); g.drawString("Proveitos Financeiros",320,162); g.drawString("Proveitos Extraordinarios",320,172); g.drawString("R.Liquido 31/12/96: -1371 mcts",4,162); g.drawString("Cash-Flow 31/12/96: 5267 mcts",4,172); } } ------=_NextPart_000_0015_01BD4F5A.80CB4CE0 Content-Type: application/octet-stream; name="gportucel.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gportucel.java" import java.io.*; import java.lang.*; import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.net.*; public class gportucel extends Panel implements AdjustmentListener { int i,regnum; int reg =3D 0; int valor, perc, rectg =3D 0; float media1, media2; float total1 =3D 0.0f, total2 =3D 0.0f; public Scrollbar scrollac, scrollest; float[][] cot =3D new float[5][44]; int regua =3D 0; // linha nova String[] dua =3D new String[24]; // linha nova String[] d =3D new String[44]; float[] ua =3D new float[24]; String rmd, dvp, rdesde, vc, vf12, maxuad, minuad, ud; // linha = super-nova float ummpa =3D 0.0f, uestoc =3D 0.0f, umm3 =3D 0.0f; // variaveis = para comentarios int = jan=3D0,fev=3D0,mar=3D0,abr=3D0,mai=3D0,jun=3D0,jul=3D0,ago=3D0,set=3D0,o= ut=3D0,nov=3D0,dez=3D0; private DataInputStream input; URL url; gportucel(){ scrollac =3D new Scrollbar(Scrollbar.HORIZONTAL,7,20,1,119); scrollac.addAdjustmentListener(this); valor =3D scrollac.getValue(); setLayout(null); add(scrollac); scrollac.setBounds(430,3,50,10); scrollest =3D new Scrollbar(Scrollbar.HORIZONTAL,5,20,1,119); scrollest.addAdjustmentListener(this); perc =3D scrollest.getValue(); setLayout(null); add(scrollest); scrollest.setBounds(418,295,50,10); // abre o ficheiro (open file to read) try { */ ----------------------- Here the problem begins ----------------*/ // this url doesn't work properly through the internet // url =3D new = URL("http://www.multi.pt/icc-consult/pv/biggraf/portucel.icc"); url =3D new URL("file://c:/icc/pv/biggraf/portucel.icc"); // and this one works just fine at my home computer url.openConnection(); input =3D new DataInputStream(new = FileInputStream(url.getFile())); } catch ( MalformedURLException mal ) { System.err.println( " URL invalido...\n"+ mal.toString()); } catch ( IOException e ) { System.err.println( " O ficheiro nao foi aberto = correctamente\n"+ e.toString()); System.exit(1); } catch ( Exception ex ) { System.err.println( " URL nao autorizado...\n"+ ex.toString()); } reg =3D 0; // contador do n=A7 de registos for(int k =3D 0;k < 44;k++) { d[k] =3D""; cot[0][k] =3D 0.0f; cot[1][k] =3D 0.0f; cot[2][k] =3D 0.0f; cot[3][k] =3D 0.0f; cot[4][k] =3D 0.0f; } //vai buscar os valores ao ficheiro int k =3D 0; while (k =3D=3D 0) {=20 try { d[reg] =3D input.readUTF(); cot[0][reg] =3D input.readFloat(); cot[1][reg] =3D input.readFloat(); cot[2][reg] =3D input.readFloat(); cot[3][reg] =3D input.readFloat(); cot[4][reg] =3D input.readFloat(); reg++; } catch ( EOFException e ) { closeFile(); k =3D 1; } catch ( IOException e ) { System.err.println("Erro na leitura do ficheiro\n"+ e.toString()); System.exit(1); } } // encerra o ciclo while k // linhas novas // abre o ficheiro do ultimo ano try { url =3D new URL("file://c:/icc/pv/biggraf/portucel.iua"); url.openConnection(); input =3D new DataInputStream(new = FileInputStream(url.getFile())); } catch ( MalformedURLException mal ) { System.err.println( " URL invalido...\n"+ mal.toString()); } catch ( IOException e ) { System.err.println( " O ficheiro nao foi aberto = correctamente\n"+ e.toString()); System.exit(1); } catch ( Exception ex ) { System.err.println( " URL nao autorizado...\n"+ ex.toString()); } //vai buscar ao ficheiro as cotacoes do ultimo ano for(k =3D 0;k < 24;k++) { dua[k] =3D""; ua[k] =3D 0.0f; } k =3D 0; while (k =3D=3D 0) {=20 try { dua[regua] =3D input.readUTF(); ua[regua] =3D input.readFloat(); regua++; } catch ( EOFException e ) { closeFile(); k =3D 1; } catch ( IOException e ) { System.err.println("Erro na leitura do ficheiro\n"+ e.toString()); System.exit(1); } } // encerra o ciclo while k // fim de linhas novas regnum =3D (reg-1); // indica o registo corrente for(i=3D0;i < reg;i++) { if ((jan =3D=3D 0 )&&( d[i].substring(2,4).equals("01"))) jan = =3D (i+1); if ((fev =3D=3D 0 )&&( d[i].substring(2,4).equals("02"))) fev = =3D (i+1); if ((mar =3D=3D 0 )&&( d[i].substring(2,4).equals("03"))) mar = =3D (i+1); if ((abr =3D=3D 0 )&&( d[i].substring(2,4).equals("04"))) abr = =3D (i+1); if ((mai =3D=3D 0 )&&( d[i].substring(2,4).equals("05"))) mai = =3D (i+1); if ((jun =3D=3D 0 )&&( d[i].substring(2,4).equals("06"))) jun = =3D (i+1); if ((jul =3D=3D 0 )&&( d[i].substring(2,4).equals("07"))) jul = =3D (i+1); if ((ago =3D=3D 0 )&&( d[i].substring(2,4).equals("08"))) ago = =3D (i+1); if ((set =3D=3D 0 )&&( d[i].substring(2,4).equals("09"))) set = =3D (i+1); if ((out =3D=3D 0 )&&( d[i].substring(2,4).equals("10"))) out = =3D (i+1); if ((nov =3D=3D 0 )&&( d[i].substring(2,4).equals("11"))) nov = =3D (i+1); if ((dez =3D=3D 0 )&&( d[i].substring(2,4).equals("12"))) dez = =3D (i+1); } // apaga tracos de mes excessivos if ((fev>0)&&((fev-jan)<17)) jan =3D 0; if ((mar>0)&&((mar-fev)<17)) fev =3D 0; if ((abr>0)&&((abr-mar)<17)) mar =3D 0; if ((mai>0)&&((mai-abr)<17)) abr =3D 0; if ((jun>0)&&((jun-mai)<17)) mai =3D 0; if ((jul>0)&&((jul-jun)<17)) jun =3D 0; if ((ago>0)&&((ago-jul)<17)) jul =3D 0; if ((set>0)&&((set-ago)<17)) ago =3D 0; if ((out>0)&&((out-set)<17)) set =3D 0; if ((nov>0)&&((nov-out)<17)) out =3D 0; if ((dez>0)&&((dez-nov)<17)) nov =3D 0; if ((jan>0)&&((jan-dez)<17)) dez =3D 0; // linhas super-novas // abre o ficheiro das estatisticas try { url =3D new URL("file://c:/icc/pv/biggraf/portucel.ist"); url.openConnection(); input =3D new DataInputStream(new = FileInputStream(url.getFile())); } catch ( MalformedURLException mal ) { System.err.println( " URL invalido...\n"+ mal.toString()); } catch ( IOException e ) { System.err.println( " O ficheiro nao foi aberto = correctamente\n"+ e.toString()); System.exit(1); } catch ( Exception ex ) { System.err.println( " URL nao autorizado...\n"+ ex.toString()); } //vai buscar ao ficheiro as cotacoes do ultimo ano try { rmd =3D input.readUTF(); dvp =3D input.readUTF(); rdesde =3D input.readUTF(); vc =3D input.readUTF(); vf12 =3D input.readUTF(); maxuad =3D input.readUTF(); minuad =3D input.readUTF(); ud =3D input.readUTF(); } catch ( EOFException e ) { closeFile(); } catch ( IOException e ) { System.err.println("Erro na leitura do ficheiro\n"+ e.toString()); System.exit(1); } // fim de linhas super-novas } // fecha ggraf =20 public void closeFile() { try { input.close(); } catch( IOException e ) { System.err.println(" Erro no fecho do = ficheiro\n"+e.toString()); System.exit(1); } } public Dimension getPreferredSize(){ return new Dimension(636,450); } =20 public void adjustmentValueChanged(AdjustmentEvent e) { if (e.getAdjustable() =3D=3D scrollac) { valor =3D e.getValue(); rectg =3D 1; } if (e.getAdjustable() =3D=3D scrollest){ perc =3D e.getValue(); rectg =3D 3; } repaint(); } public void update(Graphics g) { paint(g); } public void paint(Graphics g) { if (rectg =3D=3D 0) { g.setColor(Color.blue); g.fillRect(0,0,268,292); g.setColor(Color.yellow); g.drawString("Rent.Media Diaria:",10,20); g.drawString("Desvio Padrao:",10,32); g.drawString("Rent. desde 31/12:",10,44); g.drawString("N.Medio Transaccoes:",10,64); g.drawString("Valor Contabilistico:",10,84); g.drawString("Valor Fundamental:",10,96); g.drawString("Ultimo Dividendo:",10,116); g.drawString("Cot. Max. Ult. Ano:",10,128); g.drawString("Cot. Min. Ult. Ano:",10,140); g.drawString("Ultima Actualizacao:",10,160); g.drawString("Quantidade:",10,172); g.drawString("Abertura:",10,184); g.drawString("Maximo:",10,196); g.drawString("Minimo:",10,208); g.drawString("Fecho:",10,220); g.setColor(Color.white); // linhas que substituiem outras g.drawString(rmd,145,20); // rmd g.drawString(dvp,145,32); // dvpd g.drawString(rdesde,145,44); // rent. ult. ano g.drawString(vc,145,84); // valor contab. g.drawString(vf12,145,96); // valor fund. 1 e 2 g.drawString(ud,145,116); // ultimo dividendo g.drawString(maxuad,145,128); // max. ult. ano g.drawString(minuad,145,140); // min. ult. ano // fim de linhas que substituen outras g.drawString(d[43],145,160); // hora ultima = actualizacao g.drawString(String.valueOf(cot[0][43]),145,172); // quantidade g.drawString(String.valueOf(cot[1][43]),145,184); // abertura g.drawString(String.valueOf(cot[2][43]),145,196); // maximo g.drawString(String.valueOf(cot[3][43]),145,208); // minimo g.drawString(String.valueOf(cot[4][43]),145,220); // fecho g.setColor(Color.yellow); g.drawString("MERCADO:",10,240); } // desenho dos botoes if ((rectg =3D=3D 0) || (rectg =3D=3D 1)) { g.setColor(Color.lightGray); g.fill3DRect(268,0,362,190,true); // botao grafico accoes g.setColor(Color.white); g.drawRect(305,31,322,16); g.drawRect(305,63,322,16); g.drawRect(305,95,322,16); g.drawRect(305,127,322,16); g.drawRect(305,159,322,16); if (jan!=3D0) g.drawLine(306+(7*jan),15,306+(7*jan),175); if (fev!=3D0) g.drawLine(306+(7*fev),15,306+(7*fev),175); if (mar!=3D0) g.drawLine(306+(7*mar),15,306+(7*mar),175); if (abr!=3D0) g.drawLine(306+(7*abr),15,306+(7*abr),175); if (mai!=3D0) g.drawLine(306+(7*mai),15,306+(7*mai),175); if (jun!=3D0) g.drawLine(306+(7*jun),15,306+(7*jun),175); if (jul!=3D0) g.drawLine(306+(7*jul),15,306+(7*jul),175); if (ago!=3D0) g.drawLine(306+(7*ago),15,306+(7*ago),175); if (set!=3D0) g.drawLine(316+(7*set),15,306+(7*set),175); if (out!=3D0) g.drawLine(306+(7*out),15,306+(7*out),175); if (nov!=3D0) g.drawLine(306+(7*nov),15,306+(7*nov),175); if (dez!=3D0) g.drawLine(306+(7*dez),15,306+(7*dez),175); g.setColor(Color.blue); g.fillRect(312,8,5,5); g.setColor(Color.red); g.fillRect(484,8,5,5); g.setColor(Color.black); g.drawRect(305,15,322,160); // grafico accoes g.drawString("Cotacoes",320,13); g.drawString(" "+String.valueOf(valor),530,13); g.drawString("MMPA",493,13); if (jan!=3D0) g.drawString("Jan",306+(7*jan),188); if (fev!=3D0) g.drawString("Fev",306+(7*fev),188); if (mar!=3D0) g.drawString("Mar",306+(7*mar),188); if (abr!=3D0) g.drawString("Abr",306+(7*abr),188); if (mai!=3D0) g.drawString("Mai",306+(7*mai),188); if (jun!=3D0) g.drawString("Jun",306+(7*jun),188); if (jul!=3D0) g.drawString("Jul",306+(7*jul),188); if (ago!=3D0) g.drawString("Ago",306+(7*ago),188); =20 if (set!=3D0) g.drawString("Set",306+(7*set),188); if (out!=3D0) g.drawString("Out",306+(7*out),188); if (nov!=3D0) g.drawString("Nov",306+(7*nov),188); if (dez!=3D0) g.drawString("Dez",306+(7*dez),188);=20 float cmax =3D cot[2][0]; float cmin =3D cot[3][0]; for(i=3D0;i<=3D43;i++){ if (cot[2][i]>cmax) cmax=3Dcot[2][i]; if (((cot[3][i]ummpa)=20 { g.setColor(Color.blue); g.drawString("FORTE:",10,252); g.drawString("Fecho acima MMPA.",60,252); } else { g.setColor(Color.blue); g.drawString("FRACO:",10,252); g.drawString("Fecho abaixo MMPA.",60,252); } /* MMPA de valor termos */ g.setColor(Color.red); for(i=3Dvalor;i<=3D43;i++){ total1=3D0.0f; total2=3D0.0f; for(int j=3D1;j<=3Dvalor;j++) total1+=3Dcot[1][i-j]; total2=3Dtotal1-cot[1][i-valor]+cot[1][i]; if (((total1/valor)>=3Dcmin) && ((total2/valor)>=3Dcmin)) = g.drawLine(306+(7*i),15+Math.round(((cmax-(total1/valor))/itvlinhas)*16),= = 313+(7*i),15+Math.round(((cmax-(total2/valor))/itvlinhas)*16)); if ((i =3D=3D 43)&&((total2/valor)>=3Dcmin)) ummpa =3D = (total2/valor);=20 } /* fim de MMPA */ if (cot[4][43]>ummpa)=20 { g.setColor(Color.green); g.drawString("FORTE:",10,252); g.setColor(Color.white); g.drawString("Fecho acima MMPA.",60,252); } else { g.setColor(Color.magenta); g.drawString("FRACO:",10,252); g.setColor(Color.white); g.drawString("Fecho abaixo MMPA.",60,252); } g.setColor(Color.blue); for(i=3D0;i<=3D43;i++){ if (cot[0][i]!=3D0){ = g.drawLine(316+(7*i),15+Math.round(((cmax-cot[2][i])/itvlinhas)*16), = 316+(7*i),15+Math.round(((cmax-cot[3][i])/itvlinhas)*16)); = g.drawLine(313+(7*i),15+Math.round(((cmax-cot[1][i])/itvlinhas)*16), = 316+(7*i),15+Math.round(((cmax-cot[1][i])/itvlinhas)*16)); = g.drawLine(316+(7*i),15+Math.round(((cmax-cot[4][i])/itvlinhas)*16), = 319+(7*i),15+Math.round(((cmax-cot[4][i])/itvlinhas)*16)); } } } // inteiro!=3D0 }// rect=3D1 if ((rectg =3D=3D 0) || (rectg =3D=3D 2)) { g.setColor(Color.lightGray); g.fill3DRect(268,190,362,102,true); // botao grafico transaccoes g.setColor(Color.white); g.drawRect(305,213,322,8); g.drawRect(305,229,322,8); g.drawRect(305,245,322,8); g.drawRect(305,261,322,8); g.drawLine(305,277,627,277); if (jan!=3D0) g.drawLine(306+(7*jan),205,306+(7*jan),285); if (fev!=3D0) g.drawLine(306+(7*fev),205,306+(7*fev),285); if (mar!=3D0) g.drawLine(306+(7*mar),205,306+(7*mar),285); if (abr!=3D0) g.drawLine(306+(7*abr),205,306+(7*abr),285); if (mai!=3D0) g.drawLine(306+(7*mai),205,306+(7*mai),285); if (jun!=3D0) g.drawLine(306+(7*jun),205,306+(7*jun),285); if (jul!=3D0) g.drawLine(306+(7*jul),205,306+(7*jul),285); if (ago!=3D0) g.drawLine(306+(7*ago),205,306+(7*ago),285); if (set!=3D0) g.drawLine(306+(7*set),205,306+(7*set),285); if (out!=3D0) g.drawLine(306+(7*out),205,306+(7*out),285); if (nov!=3D0) g.drawLine(306+(7*nov),205,306+(7*nov),285); if (dez!=3D0) g.drawLine(306+(7*dez),205,306+(7*dez),285); g.setColor(Color.black); g.drawRect(305,205,322,80); // grafico transaccoes g.drawString("Transaccoes (10^3)",424,203); float max =3D cot[0][0]; float min =3D cot[0][0]; for(i=3D0;i<=3D43;i++){ if (cot[0][i]>max) max=3Dcot[0][i]; if (cot[0][i]umm3)&&(uestoc>70)) { g.setColor(Color.blue); g.drawString("FORTE:",10,288); g.drawString("Estocastica acima de 70% e da MM3",60,288); } if ((uestocmax) max=3Dcot[2][i-j]; if ((cot[3][i-j]min) est1 =3D (((cot[4][i-1]-min)/(max-min)*100));=20 else est1 =3D -1.0f;=20 max =3D 0.0f; min =3D 0.0f; for(int j=3D1;j<=3Dperc;j++){ if (cot[2][i-j+1]>max) max=3Dcot[2][i-j+1]; if ((cot[3][i-j+1]min) est2 =3D (((cot[4][i]-min)/(max-min)*100));=20 else est2 =3D -1.0f;=20 max =3D 0.0f; min =3D 0.0f; for(int j=3D1;j<=3Dperc;j++){ if (cot[2][i-j+2]>max) max=3Dcot[2][i-j+2]; if ((cot[3][i-j+2]min) est3 =3D (((cot[4][i+1]-min)/(max-min)*100));=20 else est3 =3D -1.0f;=20 max =3D 0.0f; min =3D 0.0f; for(int j=3D1;j<=3Dperc;j++){ if (cot[2][i-j+3]>max) max=3Dcot[2][i-j+3]; if ((cot[3][i-j+3]min) est4 =3D (((cot[4][i+2]-min)/(max-min)*100));=20 else est4 =3D -1.0f;=20 g.setColor(Color.blue); if ((est1>=3D0)&&(est2>=3D0)&&(est3>=3D0)&&(est4>=3D0)){ g.drawLine(309+(7*i),307+Math.round(((100-est1)/10)*9), 316+(7*i),307+Math.round(((100-est2)/10)*9)); g.drawLine(323+(7*i),307+Math.round(((100-est3)/10)*9), 330+(7*i),307+Math.round(((100-est4)/10)*9)); } g.setColor(Color.red); if ((est1>=3D0) && (est2>=3D0) && (est3>=3D0) && (est4>=3D0)){ float media1 =3D (est1+est2+est3)/3; float media2 =3D (est2+est3+est4)/3; g.drawLine(323+(7*i),307+Math.round(((100-media1)/10)*9), 330+(7*i),307+Math.round(((100-media2)/10)*9)); if (i =3D=3D 41) umm3 =3D media2; if (i =3D=3D 41) uestoc =3D est4; } } if ((uestoc>umm3)&&(uestoc>70)) { g.setColor(Color.green); g.drawString("FORTE:",10,288); g.setColor(Color.white); g.drawString("Estocastica acima de 70% e da MM3",60,288); } if ((uestocmax) max=3Dua[i]; if (((ua[i]cot[2][42])&&(cot[3][43]>cot[3][42])&&(cot[0][43]>cot[0][42]= )) { g.setColor(Color.green); g.drawString("FORTE:",10,264); g.setColor(Color.white); g.drawString("Aumento de transaccoes e aumento",60,264); g.drawString("de cotacoes",60,276); } if = ((cot[2][43]cot[0][42]= )) { g.setColor(Color.magenta); g.drawString("FRACO:",10,264); g.setColor(Color.white); g.drawString("Aumento de transaccoes e descida",60,264); g.drawString("de cotacoes.",60,276); } } // fecha o public void paint } ------=_NextPart_000_0015_01BD4F5A.80CB4CE0 Content-Type: text/html; name="portucel.html" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="portucel.html"

Balanço e Demonstração de Resultados = Líquidos da PORTUCEL

Página Anterior = --=BB |  | Balanço = Numérico --=BB |

------=_NextPart_000_0015_01BD4F5A.80CB4CE0
Content-Type: application/octet-stream;
name="portucel.icc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="portucel.icc"

AAYxMjAxOThIyIwgRIhAAESIwABEhIAARIjAAAAGMTMwMTk4SPHigESLYABEi4AARImAAESLYAAA
BjE0MDE5OEhbqwBEjKAARI2gAESJgABEi2AAAAYxNTAxOThIz8ZgRIsAAESLAABEiIAARIlAAAAG
MTYwMTk4SCqlAESKwABEiwAARIngAESKYAAABjE5MDE5OEiuHcBEisAARIwAAESIwABEi+AAAAYy
MDAxOThJCwVgRIrAAESL4ABEikAARIrAAAAGMjEwMTk4SKzRwESLQABEi0AARIfAAESIwAAABjIy
MDE5OEh0mEBEiEAARIkAAESGwABEiQAAAAYyMzAxOThIwn5ARImAAESKAABEiGAARIkgAAAGMjYw
MTk4SA7pAESJgABEisAARIjAAESKwAAABjI3MDE5OEihl0BEisAARItgAESJgABEi2AAAAYyODAx
OThIwn4ARIuAAESMoABEiuAARIwAAAAGMjkwMTk4SP1swESMQABEjyAARIvgAESO4AAABjMwMDE5
OEiHeKBEj+AARJBgAESOAABEj8AAAAYwMjAyOThIbSqARJEAAESSQABEj8AARJIgAAAGMDMwMjk4
SYtpsESSIABEmQAARJEgAESY4AAABjA0MDI5OElq8qBEm4AARJ6AAESaAABEnOAAAAYwNTAyOThJ
GoFQRJ4AAESfIABEnKAARJ6AAAAPMDYwMjk4IC0gMTdoNDBtSSpi0ESfIABEnyAARJpgAESdoAAA
DzA5MDI5OCAtIDE2aDMwbUkAmoBEnaAARJ5gAESaIABEnEAAAAYxMDAyOThI89dARJwgAESc4ABE
mKAARJpgAAAGMTEwMjk4Sbq0kEScYABEoKAARJvgAESc4AAABjEyMDI5OEjwHaBEnOAARJ4AAESb
AABEm6AAAA0xMzAyOTggMTZoMzBtSVNbMESboABEnWAARJpgAESdYAAADTE2MDI5OCAxMWgzMG1I
wCugRJzgAESdQABEnEAARJygAAAGMTcwMjk4SUTBMESc4ABEo8AARJzgAESjwAAABjE4MDI5OElW
MXBEpkAARKwgAESmQABEq+AAAA8xOTAyOTggLSAxNmgzMG1JUHwQRK9AAESxYABErOAARK0AAAAP
MjAwMjk4IC0gMTZoMzBtSQQjMEStwABErcAARKVAAESowAAADjIzMDI5OCAtIDdoMDBtSMKMYESq
IABEq+AARKmAAESrIAAADjI1MDI5OCAtIDhoMDBtSRBVcESsQABErmAARKvgAESuYAAADzI2MDI5
OCAtIDA5aDAwbUkX1VBEruAARLBAAESswABErsAAAA8yNzAyOTggLSAwOWgwMG1I/7qARK8AAESw
QABErIAARLBAAAAPMDIwMzk4IC0gMTZoMzBtSa/LaETBwABEx2AARLuAAETE4AAADzAzMDM5OCAt
IDE2aDMwbUoy32xEwIAARMqAAETAgABEyYAAAA8wNDAzOTggLSAxNmgzMG1JbjtgRMygAETMwABE
wKAARMMAAAAPMDUwMzk4IC0gMTZoMzBtSVrDUES+IABEwwAARLwgAETDAAAADzA2MDM5OCAtIDE2
aDMwbUkuI6BEw6AARMlAAETDoABEyEAAAA8wOTAzOTggLSAxNmgzMG1JRIagRMuAAETQIABEyuAA
RM8gAAAPMTAwMzk4IC0gMTZoMzBtSY/o0ETQwABE2sAARNDAAETawAAADzExMDM5OCAtIDE2aDMw
bUmus7BE4EAAROsgAETd4ABE50AAAA8xMjAzOTggLSAxNmgzMG1J1JOoROdAAETnQABE4kAAROdA
AAAPMTMwMzk4IC0gMTZoMzBtSQ0fAETn4ABE5+AAROJAAETjgAA=

------=_NextPart_000_0015_01BD4F5A.80CB4CE0
Content-Type: application/octet-stream;
name="portucel.ist"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="portucel.ist"

AAgrIDAuMTMgJQAIKyAxLjgwICUACSsgNDAuMTYgJQAHMTExMiQwMAARMTA0MyQwMCAtIDEzNzYk
MDAAEjE2MzMkMDAgLSAwNy8wOC85NwASMTAwNiQwMCAtIDI3LzAyLzk3AA8xNS41MyAtIDI0LzQv
OTc=

------=_NextPart_000_0015_01BD4F5A.80CB4CE0
Content-Type: application/octet-stream;
name="portucel.iua"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="portucel.iua"

AAYyODAyOThEfcAAAAYxNDAzOThEiWAAAAYzMTAzOTdEiKAAAAYxNTA0OTdEiCAAAAYzMDA0OTdE
jmAAAAYxNTA1OTdEmSAAAAYzMDA1OTdElWAAAAYxNjA2OTdEn2AAAAYzMDA2OTdEoyAAAAYxNTA3
OTdEr6AAAAYzMTA3OTdExsAAAAYxNDA4OTdExEAAAAYyOTA4OTdEq8AAAAYxNTA5OTdEruAAAAYz
MDA5OTdEtoAAAAYxNTEwOTdEtAAAAAYzMTEwOTdEpWAAAAYxNDExOTdEjSAAAAYyODExOTdEkMAA
AAYxNTEyOTdEi0AAAAYzMTEyOTdEjGAAAAYxNTAxOThEiUAAAAYzMDAxOThEj8AAAAYxNjAyOThE
nKAA

------=_NextPart_000_0015_01BD4F5A.80CB4CE0
Content-Type: application/octet-stream;
name="portucel.java"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="portucel.java"

import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

// Experiencia para testar a manipula=87=C6o do rato=20

public class portucel extends Applet{=20

gportucel grf =3D new gportucel();
Frame f =3D new Frame(" Portucel Industrial - Nom. ");
WindowListener l;

public void init(){

l =3D new WindowAdapter()
{
public void windowClosing(WindowEvent e){
f.dispose();
}
public void windowIconified(WindowEvent e){
f.dispose();
}
};
setLayout(new BorderLayout());
f.add("Center",grf);
f.addWindowListener(l);
f.setSize(636,450);
f.show();
}
}

------=_NextPart_000_0015_01BD4F5A.80CB4CE0--

- Next message: CDM Direct: "Never Forget An Important Occasion Again !!!"
- Previous message: Margabandhu Prasad: "(no subject)"
- Next in thread: Marianne Mueller: "Re: Problems reading a server file through the internet"