src/java.base/share/classes/sun/nio/ch/SocketAdaptor.java
branchniosocketimpl-branch
changeset 57274 07b6be5d9150
parent 49001 ce06058197a4
child 54620 13b67c1420b8
equal deleted inserted replaced
57270:3519688a4e4d 57274:07b6be5d9150
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   214                         throw new SocketTimeoutException();
   214                         throw new SocketTimeoutException();
   215                     to = MILLISECONDS.convert(timeoutNanos, NANOSECONDS);
   215                     to = MILLISECONDS.convert(timeoutNanos, NANOSECONDS);
   216                 }
   216                 }
   217             }
   217             }
   218         }
   218         }
       
   219 
       
   220         @Override
       
   221         public int available() throws IOException {
       
   222             return sc.available();
       
   223         }
   219     }
   224     }
   220 
   225 
   221     private InputStream socketInputStream = null;
   226     private InputStream socketInputStream = null;
   222 
   227 
   223     public InputStream getInputStream() throws IOException {
   228     public InputStream getInputStream() throws IOException {