Microsoft Visual J++. Java



- 2


// sOut

OutStream.writeBytes(sOut);

//

OutStream.flush();

// bMemStream

bMemStream = baStream.toByteArray();

//

OutStream.close();

}

catch(Exception ioe)

{

}

}

// -------------------------------------------------------

// paint

// paint,

// -------------------------------------------------------

public void paint(Graphics g)

{

//

Dimension dimAppWndDimension = size();

//

g.setColor(Color.yellow);

//

g.fillRect(0, 0,

dimAppWndDimension.width - 1,

dimAppWndDimension.height - 1);

//

g.setColor(Color.black);

//

g.drawRect(0, 0,

dimAppWndDimension.width - 1,

dimAppWndDimension.height - 1);

try

{

//

InStream = new DataInputStream(

new BufferedInputStream(

new ByteArrayInputStream(bMemStream)));

//

//

g.drawString(InStream.readLine(), 10, 20);

//

InStream.close();

}

catch(Exception ioe)

{

}

}

}

2.4 HTML, Microsoft Visual J++.

2.4. MemStream\MemStream.html

<html>

<head>

<title>MemStream</title>

</head>

<body>

<hr>

<applet

code=MemStream.class

id=MemStream

width=320

height=240 >

</applet>

<hr>

<a href="MemStream.java">The source.</a>

</body>

</html>