108 |
return result; |
return result; |
109 |
} |
} |
110 |
|
|
111 |
|
public abstract int write (ByteBuffer src) throws IOException; |
112 |
|
|
113 |
/** |
/** |
114 |
* Writes data to the channel. |
* Writes data to the channel. |
115 |
*/ |
*/ |
116 |
public abstract long write(ByteBuffer[] srcs, int offset, int length) |
public abstract long write(ByteBuffer[] srcs, int offset, int length) |
117 |
throws IOException; |
throws IOException; |
118 |
|
|
119 |
|
public final long read (ByteBuffer[] dsts) throws IOException |
120 |
|
{ |
121 |
|
long result = 0; |
122 |
|
|
123 |
|
for (int i = 0; i < dsts.length; i++) |
124 |
|
{ |
125 |
|
read (dsts [i]); |
126 |
|
} |
127 |
|
|
128 |
|
return result; |
129 |
|
} |
130 |
|
|
131 |
/** |
/** |
132 |
* Reads data from the channel. |
* Reads data from the channel. |
133 |
*/ |
*/ |