/[classpath]/classpath/java/nio/channels/spi/AbstractInterruptibleChannel.java
ViewVC logotype

Diff of /classpath/java/nio/channels/spi/AbstractInterruptibleChannel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by egagnon, Sun Aug 11 20:08:43 2002 UTC revision 1.3 by mkoch, Mon Nov 11 16:19:30 2002 UTC
# Line 1  Line 1 
1  /* AbstractInterruptibleChannel.java  /* AbstractInterruptibleChannel.java --
2     Copyright (C) 2002 Free Software Foundation, Inc.     Copyright (C) 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
# Line 35  this exception to your version of the li Line 35  this exception to your version of the li
35  obligated to do so.  If you do not wish to do so, delete this  obligated to do so.  If you do not wish to do so, delete this
36  exception statement from your version. */  exception statement from your version. */
37    
   
38  package java.nio.channels.spi;  package java.nio.channels.spi;
39    
40  import java.nio.channels.*;  import java.io.IOException;
41  import java.io.*;  import java.nio.channels.Channel;
42    import java.nio.channels.InterruptibleChannel;
43    
44  abstract public class AbstractInterruptibleChannel implements Channel, InterruptibleChannel  public abstract class AbstractInterruptibleChannel
45      implements Channel, InterruptibleChannel
46  {  {
47      boolean opened = false;    boolean opened = false;
48    
49      protected AbstractInterruptibleChannel()    protected AbstractInterruptibleChannel()
50      {    {
51      }    }
52    
53      protected final void begin()
54      protected  void begin()    {
55      {      // Marks the beginning of an I/O operation that might block indefinitely.
56          //      Marks the beginning of an I/O operation that might block indefinitely.    }
     }  
57            
58      public void close() throws IOException    public final void close() throws IOException
59      {    {
60          //Closes this channel.      // Closes this channel.
61          implCloseChannel();      implCloseChannel();
62      }    }
63    
64      protected  void end(boolean completed)    protected final void end(boolean completed)
65      {    {
66          //Marks the end of an I/O operation that might block indefinitely.      // Marks the end of an I/O operation that might block indefinitely.
67      }    }  
68    
69      protected abstract  void implCloseChannel()  throws IOException;    protected abstract void implCloseChannel() throws IOException;
70    
71      public boolean isOpen()    public final boolean isOpen()
72      {    {
73          //Tells whether or not this channel is open.      // Tells whether or not this channel is open.
74          return opened;      return opened;
75      }    }
76  }  }
77    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26