84 |
* |
* |
85 |
* When the socket is closed this is reset to -1. |
* When the socket is closed this is reset to -1. |
86 |
*/ |
*/ |
87 |
protected int native_fd = -1; |
int native_fd = -1; |
88 |
|
|
89 |
/** |
/** |
90 |
* A cached copy of the in stream for reading from the socket. |
* A cached copy of the in stream for reading from the socket. |
102 |
public PlainSocketImpl() |
public PlainSocketImpl() |
103 |
{ |
{ |
104 |
} |
} |
105 |
|
|
106 |
|
protected void finalize() throws Throwable |
107 |
|
{ |
108 |
|
synchronized (this) |
109 |
|
{ |
110 |
|
if (native_fd != -1) |
111 |
|
try |
112 |
|
{ |
113 |
|
close(); |
114 |
|
} |
115 |
|
catch (IOException ex) |
116 |
|
{ |
117 |
|
} |
118 |
|
} |
119 |
|
super.finalize(); |
120 |
|
} |
121 |
|
|
122 |
public int getNativeFD() |
public int getNativeFD() |
123 |
{ |
{ |