Top Description Fields Constructors Methods
sun.security.ssl

public Class HandshakeOutStream

extends ByteArrayOutputStream
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, java.nio.ByteBuffer

Output stream for handshake data. This is used only internally to the SSL classes. MT note: one thread at a time is presumed be writing handshake messages, but (after initial connection setup) it's possible to have other threads reading/writing application data. It's the SSLSocketImpl class that synchronizes record writes.
Author
David Brownell

Field Summary

Modifier and TypeField and Description
pack-priv OutputRecord
Inherited from java.io.ByteArrayOutputStream:
bufcount

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static void
checkOverflow(int length, int limit)

pack-priv void
public void
flush()

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Flushes this output stream and forces any buffered output bytes to be written out.

public void
putBytes16(byte[] b)

pack-priv void
putBytes24(byte[] b)

pack-priv void
putBytes8(byte[] b)

pack-priv void
putInt16(int i)

pack-priv void
putInt24(int i)

pack-priv void
putInt32(int i)

pack-priv void
putInt8(int i)

public void
write(byte[]
the data.
b
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.ByteArrayOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this ByteArrayOutputStream.

Inherited from java.io.ByteArrayOutputStream:
closeresetsizetoByteArraytoStringtoStringtoStringtoStringwritewriteByteswriteTo

Field Detail

outputRecordback to summary
pack-priv OutputRecord outputRecord

Constructor Detail

HandshakeOutStreamback to summary
pack-priv HandshakeOutStream(OutputRecord outputRecord)

Method Detail

checkOverflowback to summary
private static void checkOverflow(int length, int limit)
completeback to summary
pack-priv void complete() throws IOException
flushback to summary
public void flush() throws IOException

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Doc from java.io.OutputStream.flush.

Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
putBytes16back to summary
public void putBytes16(byte[] b) throws IOException
putBytes24back to summary
pack-priv void putBytes24(byte[] b)
putBytes8back to summary
pack-priv void putBytes8(byte[] b) throws IOException
putInt16back to summary
pack-priv void putInt16(int i) throws IOException
putInt24back to summary
pack-priv void putInt24(int i)
putInt32back to summary
pack-priv void putInt32(int i)
putInt8back to summary
pack-priv void putInt8(int i) throws IOException
writeback to summary
public void write(byte[] b, int off, int len)

Overrides java.io.ByteArrayOutputStream.write.

Doc from java.io.ByteArrayOutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this ByteArrayOutputStream.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override