2023-05-23 15:24:10 +01:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
< html lang = "en" >
< head >
2023-06-11 02:54:23 +01:00
<!-- Generated by javadoc (1.8.0_262) on Sun Jun 11 02:31:49 BST 2023 -->
2023-05-23 15:24:10 +01:00
< title > NetworkOutputStream< / title >
2023-06-11 02:54:23 +01:00
< meta name = "date" content = "2023-06-11" >
2023-05-23 15:24:10 +01:00
< link rel = "stylesheet" type = "text/css" href = "../../../../../stylesheet.css" title = "Style" >
< script type = "text/javascript" src = "../../../../../script.js" > < / script >
< / head >
< body >
< script type = "text/javascript" > < ! - -
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="NetworkOutputStream";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
< / script >
< noscript >
< div > JavaScript is disabled on your browser.< / div >
< / noscript >
<!-- ========= START OF TOP NAVBAR ======= -->
< div class = "topNav" > < a name = "navbar.top" >
<!-- -->
< / a >
< div class = "skipNav" > < a href = "#skip.navbar.top" title = "Skip navigation links" > Skip navigation links< / a > < / div >
< a name = "navbar.top.firstrow" >
<!-- -->
< / a >
< ul class = "navList" title = "Navigation" >
< li > < a href = "../../../../../overview-summary.html" > Overview< / a > < / li >
< li > < a href = "package-summary.html" > Package< / a > < / li >
< li class = "navBarCell1Rev" > Class< / li >
< li > < a href = "package-tree.html" > Tree< / a > < / li >
< li > < a href = "../../../../../deprecated-list.html" > Deprecated< / a > < / li >
< li > < a href = "../../../../../index-files/index-1.html" > Index< / a > < / li >
< li > < a href = "../../../../../help-doc.html" > Help< / a > < / li >
< / ul >
< / div >
< div class = "subNav" >
< ul class = "navList" >
< li > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html" title = "class in com.captainalm.lib.calmnet.stream" > < span class = "typeNameLink" > Prev Class< / span > < / a > < / li >
< li > Next Class< / li >
< / ul >
< ul class = "navList" >
< li > < a href = "../../../../../index.html?com/captainalm/lib/calmnet/stream/NetworkOutputStream.html" target = "_top" > Frames< / a > < / li >
< li > < a href = "NetworkOutputStream.html" target = "_top" > No Frames< / a > < / li >
< / ul >
< ul class = "navList" id = "allclasses_navbar_top" >
< li > < a href = "../../../../../allclasses-noframe.html" > All Classes< / a > < / li >
< / ul >
< div >
< script type = "text/javascript" > < ! - -
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
< / script >
< / div >
< div >
< ul class = "subNavList" >
< li > Summary: < / li >
< li > Nested | < / li >
< li > Field | < / li >
< li > < a href = "#constructor.summary" > Constr< / a > | < / li >
< li > < a href = "#method.summary" > Method< / a > < / li >
< / ul >
< ul class = "subNavList" >
< li > Detail: < / li >
< li > Field | < / li >
< li > < a href = "#constructor.detail" > Constr< / a > | < / li >
< li > < a href = "#method.detail" > Method< / a > < / li >
< / ul >
< / div >
< a name = "skip.navbar.top" >
<!-- -->
< / a > < / div >
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
< div class = "header" >
< div class = "subTitle" > com.captainalm.lib.calmnet.stream< / div >
< h2 title = "Class NetworkOutputStream" class = "title" > Class NetworkOutputStream< / h2 >
< / div >
< div class = "contentContainer" >
< ul class = "inheritance" >
< li > java.lang.Object< / li >
< li >
< ul class = "inheritance" >
< li > java.io.OutputStream< / li >
< li >
< ul class = "inheritance" >
< li > com.captainalm.lib.calmnet.stream.NetworkOutputStream< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< div class = "description" >
< ul class = "blockList" >
< li class = "blockList" >
< dl >
< dt > All Implemented Interfaces:< / dt >
< dd > java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable< / dd >
< / dl >
< hr >
< br >
< pre > public class < span class = "typeNameLabel" > NetworkOutputStream< / span >
extends java.io.OutputStream< / pre >
< div class = "block" > This class provides a Network Output stream for either < code > Socket< / code > s or < code > DatagramSocket< / code > s.< / div >
< dl >
< dt > < span class = "simpleTagLabel" > Author:< / span > < / dt >
< dd > Captain ALM< / dd >
< / dl >
< / li >
< / ul >
< / div >
< div class = "summary" >
< ul class = "blockList" >
< li class = "blockList" >
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
< ul class = "blockList" >
< li class = "blockList" > < a name = "constructor.summary" >
<!-- -->
< / a >
< h3 > Constructor Summary< / h3 >
< table class = "memberSummary" border = "0" cellpadding = "3" cellspacing = "0" summary = "Constructor Summary table, listing constructors, and an explanation" >
< caption > < span > Constructors< / span > < span class = "tabEnd" > < / span > < / caption >
< tr >
< th class = "colOne" scope = "col" > Constructor and Description< / th >
< / tr >
< tr class = "altColor" >
< td class = "colOne" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#NetworkOutputStream-java.net.DatagramSocket-" > NetworkOutputStream< / a > < / span > (java.net.DatagramSocket socketIn)< / code >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > .< / div >
< / td >
< / tr >
< tr class = "rowColor" >
< td class = "colOne" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#NetworkOutputStream-java.net.DatagramSocket-int-" > NetworkOutputStream< / a > < / span > (java.net.DatagramSocket socketIn,
int size)< / code >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > and datagram buffer size.< / div >
< / td >
< / tr >
< tr class = "altColor" >
< td class = "colOne" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#NetworkOutputStream-java.net.DatagramSocket-int-java.net.InetAddress-int-" > NetworkOutputStream< / a > < / span > (java.net.DatagramSocket socketIn,
int size,
java.net.InetAddress address,
int port)< / code >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > , datagram buffer size, < code > InetAddress< / code > target and port target.< / div >
< / td >
< / tr >
< tr class = "rowColor" >
< td class = "colOne" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#NetworkOutputStream-java.net.Socket-" > NetworkOutputStream< / a > < / span > (java.net.Socket socketIn)< / code >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > Socket< / code > .< / div >
< / td >
< / tr >
< / table >
< / li >
< / ul >
<!-- ========== METHOD SUMMARY =========== -->
< ul class = "blockList" >
< li class = "blockList" > < a name = "method.summary" >
<!-- -->
< / a >
< h3 > Method Summary< / h3 >
< table class = "memberSummary" border = "0" cellpadding = "3" cellspacing = "0" summary = "Method Summary table, listing methods, and an explanation" >
< caption > < span id = "t0" class = "activeTableTab" > < span > All Methods< / span > < span class = "tabEnd" > < / span > < / span > < span id = "t2" class = "tableTab" > < span > < a href = "javascript:show(2);" > Instance Methods< / a > < / span > < span class = "tabEnd" > < / span > < / span > < span id = "t4" class = "tableTab" > < span > < a href = "javascript:show(8);" > Concrete Methods< / a > < / span > < span class = "tabEnd" > < / span > < / span > < / caption >
< tr >
< th class = "colFirst" scope = "col" > Modifier and Type< / th >
< th class = "colLast" scope = "col" > Method and Description< / th >
< / tr >
< tr id = "i0" class = "altColor" >
< td class = "colFirst" > < code > boolean< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#canDatagramBufferBeSet--" > canDatagramBufferBeSet< / a > < / span > ()< / code >
< div class = "block" > Gets if the < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setDatagramBufferSize-int-" > < code > setDatagramBufferSize(int)< / code > < / a > can be used.< / div >
< / td >
< / tr >
< tr id = "i1" class = "rowColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#close--" > close< / a > < / span > ()< / code >
< div class = "block" > Closes this output stream and releases any system resources
associated with this stream.< / div >
< / td >
< / tr >
< tr id = "i2" class = "altColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#flush--" > flush< / a > < / span > ()< / code >
< div class = "block" > Flushes this output stream and forces any buffered output bytes
to be written out.< / div >
< / td >
< / tr >
< tr id = "i3" class = "rowColor" >
< td class = "colFirst" > < code > java.net.InetAddress< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getAddress--" > getAddress< / a > < / span > ()< / code >
< div class = "block" > Gets the current < code > InetAddress< / code > of the stream.< / div >
< / td >
< / tr >
< tr id = "i4" class = "altColor" >
< td class = "colFirst" > < code > java.net.DatagramSocket< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getDatagramSocket--" > getDatagramSocket< / a > < / span > ()< / code >
< div class = "block" > Gets the datagram socket in use or null.< / div >
< / td >
< / tr >
< tr id = "i5" class = "rowColor" >
< td class = "colFirst" > < code > java.net.InetAddress< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getLocalAddress--" > getLocalAddress< / a > < / span > ()< / code >
< div class = "block" > Gets the local < code > InetAddress< / code > of the stream.< / div >
< / td >
< / tr >
< tr id = "i6" class = "altColor" >
< td class = "colFirst" > < code > java.lang.Integer< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getLocalPort--" > getLocalPort< / a > < / span > ()< / code >
< div class = "block" > Gets the local port of the stream.< / div >
< / td >
< / tr >
< tr id = "i7" class = "rowColor" >
< td class = "colFirst" > < code > java.lang.Integer< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getPort--" > getPort< / a > < / span > ()< / code >
< div class = "block" > Gets the current port of the stream.< / div >
< / td >
< / tr >
< tr id = "i8" class = "altColor" >
< td class = "colFirst" > < code > java.net.Socket< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#getSocket--" > getSocket< / a > < / span > ()< / code >
< div class = "block" > Gets the socket in use or null.< / div >
< / td >
< / tr >
< tr id = "i9" class = "rowColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setDatagramBufferSize-int-" > setDatagramBufferSize< / a > < / span > (int size)< / code >
< div class = "block" > Sets the buffer size for sending datagrams.< / div >
< / td >
< / tr >
< tr id = "i10" class = "altColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setDatagramSocket-java.net.DatagramSocket-" > setDatagramSocket< / a > < / span > (java.net.DatagramSocket socketIn)< / code >
< div class = "block" > Sets the datagram socket in use.< / div >
< / td >
< / tr >
< tr id = "i11" class = "rowColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setDatagramTarget-java.net.InetAddress-int-" > setDatagramTarget< / a > < / span > (java.net.InetAddress address,
int port)< / code >
< div class = "block" > Sets the datagram target < code > InetAddress< / code > and port.< / div >
< / td >
< / tr >
< tr id = "i12" class = "altColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setSocket-java.net.Socket-" > setSocket< / a > < / span > (java.net.Socket socketIn)< / code >
< div class = "block" > Sets the socket in use.< / div >
< / td >
< / tr >
< tr id = "i13" class = "rowColor" >
< td class = "colFirst" > < code > void< / code > < / td >
< td class = "colLast" > < code > < span class = "memberNameLink" > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#write-int-" > write< / a > < / span > (int b)< / code >
< div class = "block" > Writes the specified byte to this output stream.< / div >
< / td >
< / tr >
< / table >
< ul class = "blockList" >
< li class = "blockList" > < a name = "methods.inherited.from.class.java.io.OutputStream" >
<!-- -->
< / a >
< h3 > Methods inherited from class java.io.OutputStream< / h3 >
< code > write, write< / code > < / li >
< / ul >
< ul class = "blockList" >
< li class = "blockList" > < a name = "methods.inherited.from.class.java.lang.Object" >
<!-- -->
< / a >
< h3 > Methods inherited from class java.lang.Object< / h3 >
< code > equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait< / code > < / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< div class = "details" >
< ul class = "blockList" >
< li class = "blockList" >
<!-- ========= CONSTRUCTOR DETAIL ======== -->
< ul class = "blockList" >
< li class = "blockList" > < a name = "constructor.detail" >
<!-- -->
< / a >
< h3 > Constructor Detail< / h3 >
< a name = "NetworkOutputStream-java.net.Socket-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > NetworkOutputStream< / h4 >
< pre > public NetworkOutputStream(java.net.Socket socketIn)< / pre >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > Socket< / code > .< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The socket to use.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn is null.< / dd >
< / dl >
< / li >
< / ul >
< a name = "NetworkOutputStream-java.net.DatagramSocket-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > NetworkOutputStream< / h4 >
< pre > public NetworkOutputStream(java.net.DatagramSocket socketIn)< / pre >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > .< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The datagram socket to use.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn is null.< / dd >
< / dl >
< / li >
< / ul >
< a name = "NetworkOutputStream-java.net.DatagramSocket-int-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > NetworkOutputStream< / h4 >
< pre > public NetworkOutputStream(java.net.DatagramSocket socketIn,
int size)< / pre >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > and datagram buffer size.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The datagram socket to use.< / dd >
< dd > < code > size< / code > - The size of the buffer.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn is null.< / dd >
< dd > < code > java.lang.IllegalArgumentException< / code > - size is less than 1 or greater than 65535.< / dd >
< / dl >
< / li >
< / ul >
< a name = "NetworkOutputStream-java.net.DatagramSocket-int-java.net.InetAddress-int-" >
<!-- -->
< / a >
< ul class = "blockListLast" >
< li class = "blockList" >
< h4 > NetworkOutputStream< / h4 >
< pre > public NetworkOutputStream(java.net.DatagramSocket socketIn,
int size,
java.net.InetAddress address,
int port)< / pre >
< div class = "block" > Constructs a new NetworkOutputStream with the specified < code > DatagramSocket< / code > , datagram buffer size, < code > InetAddress< / code > target and port target.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The datagram socket to use.< / dd >
< dd > < code > size< / code > - The size of the buffer.< / dd >
< dd > < code > address< / code > - The target address to set to.< / dd >
< dd > < code > port< / code > - The target port to set to.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn or address is null.< / dd >
< dd > < code > java.lang.IllegalArgumentException< / code > - size is less than 1 or greater than 65535 or port is less than 0 or greater than 65535.< / dd >
< / dl >
< / li >
< / ul >
< / li >
< / ul >
<!-- ============ METHOD DETAIL ========== -->
< ul class = "blockList" >
< li class = "blockList" > < a name = "method.detail" >
<!-- -->
< / a >
< h3 > Method Detail< / h3 >
< a name = "canDatagramBufferBeSet--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > canDatagramBufferBeSet< / h4 >
< pre > public boolean canDatagramBufferBeSet()< / pre >
< div class = "block" > Gets if the < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkOutputStream.html#setDatagramBufferSize-int-" > < code > setDatagramBufferSize(int)< / code > < / a > can be used.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > If the datagram buffer size can be set.< / dd >
< / dl >
< / li >
< / ul >
< a name = "setDatagramBufferSize-int-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > setDatagramBufferSize< / h4 >
< pre > public void setDatagramBufferSize(int size)
throws java.io.IOException< / pre >
< div class = "block" > Sets the buffer size for sending datagrams.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > size< / code > - The size to set to.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.IllegalArgumentException< / code > - size is less than 1 or greater than 65535.< / dd >
< dd > < code > java.io.IOException< / code > - a datagram socket is not in use, buffer index is not null or the stream is closed.< / dd >
< / dl >
< / li >
< / ul >
< a name = "setDatagramTarget-java.net.InetAddress-int-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > setDatagramTarget< / h4 >
< pre > public void setDatagramTarget(java.net.InetAddress address,
int port)
throws java.io.IOException< / pre >
< div class = "block" > Sets the datagram target < code > InetAddress< / code > and port.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > address< / code > - The address to set to.< / dd >
< dd > < code > port< / code > - The port to set to.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - address is null.< / dd >
< dd > < code > java.lang.IllegalArgumentException< / code > - port is less than 0 or greater than 65535.< / dd >
< dd > < code > java.io.IOException< / code > - a datagram socket is not in use or the stream is closed.< / dd >
< / dl >
< / li >
< / ul >
< a name = "write-int-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > write< / h4 >
< pre > public void write(int b)
throws java.io.IOException< / pre >
< div class = "block" > Writes the specified byte to this output stream. The general
contract for < code > write< / code > is that one byte is written
to the output stream. The byte to be written is the eight
low-order bits of the argument < code > b< / code > . The 24
high-order bits of < code > b< / code > are ignored.< / div >
< dl >
< dt > < span class = "overrideSpecifyLabel" > Specified by:< / span > < / dt >
< dd > < code > write< / code > in class < code > java.io.OutputStream< / code > < / dd >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > b< / code > - the < code > byte< / code > .< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.io.IOException< / code > - if an I/O error occurs. In particular,
an < code > IOException< / code > will be thrown if the
output stream has been closed.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getAddress--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getAddress< / h4 >
< pre > public java.net.InetAddress getAddress()< / pre >
< div class = "block" > Gets the current < code > InetAddress< / code > of the stream.
Can be null.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The address.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getPort--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getPort< / h4 >
< pre > public java.lang.Integer getPort()< / pre >
< div class = "block" > Gets the current port of the stream.
Can be -1.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The current port.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getLocalAddress--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getLocalAddress< / h4 >
< pre > public java.net.InetAddress getLocalAddress()< / pre >
< div class = "block" > Gets the local < code > InetAddress< / code > of the stream.
Can be null.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The local address.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getLocalPort--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getLocalPort< / h4 >
< pre > public java.lang.Integer getLocalPort()< / pre >
< div class = "block" > Gets the local port of the stream.
Can be -1.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The local port.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getSocket--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getSocket< / h4 >
< pre > public java.net.Socket getSocket()< / pre >
< div class = "block" > Gets the socket in use or null.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The socket in use or null.< / dd >
< / dl >
< / li >
< / ul >
< a name = "setSocket-java.net.Socket-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > setSocket< / h4 >
< pre > public void setSocket(java.net.Socket socketIn)
throws java.io.IOException< / pre >
< div class = "block" > Sets the socket in use.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The socket to now use.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn is null.< / dd >
< dd > < code > java.io.IOException< / code > - stream closed or not using a socket.< / dd >
< / dl >
< / li >
< / ul >
< a name = "getDatagramSocket--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > getDatagramSocket< / h4 >
< pre > public java.net.DatagramSocket getDatagramSocket()< / pre >
< div class = "block" > Gets the datagram socket in use or null.< / div >
< dl >
< dt > < span class = "returnLabel" > Returns:< / span > < / dt >
< dd > The datagram socket in use or null.< / dd >
< / dl >
< / li >
< / ul >
< a name = "setDatagramSocket-java.net.DatagramSocket-" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > setDatagramSocket< / h4 >
< pre > public void setDatagramSocket(java.net.DatagramSocket socketIn)
throws java.io.IOException< / pre >
< div class = "block" > Sets the datagram socket in use.< / div >
< dl >
< dt > < span class = "paramLabel" > Parameters:< / span > < / dt >
< dd > < code > socketIn< / code > - The datagram socket to now use.< / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.lang.NullPointerException< / code > - socketIn is null.< / dd >
< dd > < code > java.io.IOException< / code > - stream closed or not using a datagram socket.< / dd >
< / dl >
< / li >
< / ul >
< a name = "flush--" >
<!-- -->
< / a >
< ul class = "blockList" >
< li class = "blockList" >
< h4 > flush< / h4 >
< pre > public void flush()
throws java.io.IOException< / pre >
< div class = "block" > Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of < code > flush< / code > 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.< / div >
< dl >
< dt > < span class = "overrideSpecifyLabel" > Specified by:< / span > < / dt >
< dd > < code > flush< / code > in interface < code > java.io.Flushable< / code > < / dd >
< dt > < span class = "overrideSpecifyLabel" > Overrides:< / span > < / dt >
< dd > < code > flush< / code > in class < code > java.io.OutputStream< / code > < / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.io.IOException< / code > - if an I/O error occurs.< / dd >
< / dl >
< / li >
< / ul >
< a name = "close--" >
<!-- -->
< / a >
< ul class = "blockListLast" >
< li class = "blockList" >
< h4 > close< / h4 >
< pre > public void close()
throws java.io.IOException< / pre >
< div class = "block" > Closes this output stream and releases any system resources
associated with this stream. The general contract of < code > close< / code >
is that it closes the output stream. A closed stream cannot perform
output operations and cannot be reopened. The underlying socket is closed.< / div >
< dl >
< dt > < span class = "overrideSpecifyLabel" > Specified by:< / span > < / dt >
< dd > < code > close< / code > in interface < code > java.io.Closeable< / code > < / dd >
< dt > < span class = "overrideSpecifyLabel" > Specified by:< / span > < / dt >
< dd > < code > close< / code > in interface < code > java.lang.AutoCloseable< / code > < / dd >
< dt > < span class = "overrideSpecifyLabel" > Overrides:< / span > < / dt >
< dd > < code > close< / code > in class < code > java.io.OutputStream< / code > < / dd >
< dt > < span class = "throwsLabel" > Throws:< / span > < / dt >
< dd > < code > java.io.IOException< / code > - if an I/O error occurs.< / dd >
< / dl >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / div >
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
< div class = "bottomNav" > < a name = "navbar.bottom" >
<!-- -->
< / a >
< div class = "skipNav" > < a href = "#skip.navbar.bottom" title = "Skip navigation links" > Skip navigation links< / a > < / div >
< a name = "navbar.bottom.firstrow" >
<!-- -->
< / a >
< ul class = "navList" title = "Navigation" >
< li > < a href = "../../../../../overview-summary.html" > Overview< / a > < / li >
< li > < a href = "package-summary.html" > Package< / a > < / li >
< li class = "navBarCell1Rev" > Class< / li >
< li > < a href = "package-tree.html" > Tree< / a > < / li >
< li > < a href = "../../../../../deprecated-list.html" > Deprecated< / a > < / li >
< li > < a href = "../../../../../index-files/index-1.html" > Index< / a > < / li >
< li > < a href = "../../../../../help-doc.html" > Help< / a > < / li >
< / ul >
< / div >
< div class = "subNav" >
< ul class = "navList" >
< li > < a href = "../../../../../com/captainalm/lib/calmnet/stream/NetworkInputStream.html" title = "class in com.captainalm.lib.calmnet.stream" > < span class = "typeNameLink" > Prev Class< / span > < / a > < / li >
< li > Next Class< / li >
< / ul >
< ul class = "navList" >
< li > < a href = "../../../../../index.html?com/captainalm/lib/calmnet/stream/NetworkOutputStream.html" target = "_top" > Frames< / a > < / li >
< li > < a href = "NetworkOutputStream.html" target = "_top" > No Frames< / a > < / li >
< / ul >
< ul class = "navList" id = "allclasses_navbar_bottom" >
< li > < a href = "../../../../../allclasses-noframe.html" > All Classes< / a > < / li >
< / ul >
< div >
< script type = "text/javascript" > < ! - -
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
< / script >
< / div >
< div >
< ul class = "subNavList" >
< li > Summary: < / li >
< li > Nested | < / li >
< li > Field | < / li >
< li > < a href = "#constructor.summary" > Constr< / a > | < / li >
< li > < a href = "#method.summary" > Method< / a > < / li >
< / ul >
< ul class = "subNavList" >
< li > Detail: < / li >
< li > Field | < / li >
< li > < a href = "#constructor.detail" > Constr< / a > | < / li >
< li > < a href = "#method.detail" > Method< / a > < / li >
< / ul >
< / div >
< a name = "skip.navbar.bottom" >
<!-- -->
< / a > < / div >
<!-- ======== END OF BOTTOM NAVBAR ======= -->
< / body >
< / html >