Paste-bin.xyz
Archive
Sign In
Login
Register
Username
Current Password
Keep me signed in.
Username
Full Name
Email
New Password
JAVA
53
Socket
Guest on 12th May 2022 10:03:15 AM
class
Socket
{
…
native
int
available
(
)
throws
IOException
`
{
int
num
;
int
fd
=
`
this
.
native_fd
;
if
(
ioctl
(
fd, FIONREAD,
&
num
)
!=
0
)
`
throw
new
IOException
(
`_newJavaString
(
strerror
(
errno
)
)
)
;
return
num
;
}
Raw Paste
class Socket { … native int available() throws IOException `{ int num; int fd = `this.native_fd ; if (ioctl(fd, FIONREAD, &num) != 0) `throw new IOException( `_newJavaString(strerror(errno))); return num; } }
Login
or
Register
to edit or fork this paste. It's free.