Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2a42fb025f6a33a58afb5dcaa3dbe1d0eb51e49b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>

<TITLE>
IBuffer (Net4j Signalling Platform Documentation)
</TITLE>

<META NAME="date" CONTENT="">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="IBuffer (Net4j Signalling Platform Documentation)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/IBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html" title="enum in org.eclipse.net4j.buffer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/IBufferHandler.html" title="interface in org.eclipse.net4j.buffer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/eclipse/net4j/buffer/IBuffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="IBuffer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.net4j.buffer</FONT>
<BR>
Interface IBuffer</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/eclipse/spi/net4j/InternalBuffer.html" title="interface in org.eclipse.spi.net4j">InternalBuffer</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>IBuffer</B></DL>
</PRE>

<P>
Basic <b>unit of transport</b> in Net4j.
 <p>
 A buffer is well prepared for the usage with asynchronous <A HREF="../../../../org/eclipse/net4j/channel/IChannel.html" title="interface in org.eclipse.net4j.channel"><CODE>IChannel</CODE></A>s but can also be used with pure
 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>s. All methods of <code>IBuffer</code> are non-blocking.
 <p>
 Usually buffers are obtained from a <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A>. Buffers can be accessed, passed around and finally
 <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#release()"><CODE>released</CODE></A> to their original provider. The capacity of a buffer is determined by its provider.
 <p>
 In addition to its payload data each buffer contains an internal header of four bytes, two of them representing a
 channel identifier the other two of them denoting the length of the payload data. The payload data may be accessed
 through a <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getByteBuffer()"><CODE>ByteBuffer</CODE></A>.
 <p>
 This interface is <b>not</b> intended to be implemented by clients.
 <p>
 <dt><b>Class Diagram:</b></dt>
 <dd><img src="doc-files/IBuffer-1.gif" title="Diagram Buffers" border="0" usemap="#IBuffer-1.gif"/></dd>
 <p>
 <MAP NAME="IBuffer-1.gif"> <AREA SHAPE="RECT" COORDS="303,12,403,72" HREF="IBufferHandler.html"> <AREA SHAPE="RECT"
 COORDS="533,199,619,249" HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html"> <AREA SHAPE="RECT"
 COORDS="283,126,422,322" HREF="IBuffer.html"> <AREA SHAPE="RECT" COORDS="9,180,155,268" HREF="IBufferProvider.html">
 <AREA SHAPE="RECT" COORDS="33,321,132,399" HREF="IBufferPool.html"></MAP>
 <p>
 <dt><b>State Machine Diagram:</b></dt>
 <dd><img src="doc-files/BufferState-1.gif" title="Diagram Buffer States" border="0" usemap="#BufferState-1.gif"/></dd>
 <p>
 <MAP NAME="BufferState-1.gif"> <AREA SHAPE="RECT" COORDS="300,8,449,34" HREF="BufferState.html#INITIAL"> <AREA
 SHAPE="RECT" COORDS="46,115,195,139" HREF="BufferState.html#PUTTING"> <AREA SHAPE="RECT" COORDS="48,271,195,295"
 HREF="BufferState.html#WRITING"> <AREA SHAPE="RECT" COORDS="533,112,681,140" HREF="BufferState.html#READING_HEADER">
 <AREA SHAPE="RECT" COORDS="533,271,680,295" HREF="BufferState.html#READING_BODY"> <AREA SHAPE="RECT"
 COORDS="532,428,682,451" HREF="BufferState.html#GETTING"> </MAP>
 <p>
 An example for <b>putting</b> values into a buffer and writing it to a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>:
 <p>
 
 <pre style="background-color:#ffffc8; border-width:1px; border-style:solid; padding:.5em;">
 // Obtain a fresh buffer
 Buffer buffer = bufferProvider.getBuffer(); // Start filling the buffer for channelID 4711 ByteBuffer byteBuffer =
 buffer.startPutting(4711); byteBuffer.putDouble(15.47); // Write the contents of the Buffer to a // SocketChannel
 without blocking while (!buffer.write(socketChannel)) { // Do something else }
 </pre>
 
 An example for reading a buffer from a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A> and <b>getting</b> values from it:
 <p>
 
 <pre style="background-color:#ffffc8; border-width:1px; border-style:solid; padding:.5em;">
 // Obtain a fresh buffer
 Buffer buffer = bufferProvider.getBuffer();
 
 // Read the contents of the Buffer from a SocketChannel without blocking
 ByteBuffer byteBuffer;
 while ((byteBuffer = buffer.startGetting(socketChannel)) == null)
 {
   // Do something else
 }
 
 // Access the contents of the buffer and release it to its provider
 double value = byteBuffer.getDouble();
 buffer.release();
 </pre>
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Eike Stepper</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A>, 
<A HREF="../../../../org/eclipse/net4j/channel/IChannel.html#sendBuffer(org.eclipse.net4j.buffer.IBuffer)"><CODE>IChannel.sendBuffer(IBuffer)</CODE></A>, 
<A HREF="../../../../org/eclipse/net4j/channel/IChannel.html#setReceiveHandler(org.eclipse.net4j.buffer.IBufferHandler)"><CODE>IChannel.setReceiveHandler(IBufferHandler)</CODE></A>, 
<A HREF="../../../../org/eclipse/net4j/buffer/IBufferHandler.html#handleBuffer(org.eclipse.net4j.buffer.IBuffer)"><CODE>IBufferHandler.handleBuffer(IBuffer)</CODE></A><DT><B>No Implement</B></DT>
  <DD>This interface is not intended to be implemented by clients.</DD>
<DT><B>No Extend</B></DT>
  <DD>This interface is not intended to be extended by clients.</DD>
</DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#HEADER_SIZE">HEADER_SIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#MAX_CHANNEL">MAX_CHANNEL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#MIN_CHANNEL">MIN_CHANNEL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#NO_CHANNEL">NO_CHANNEL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Possible argument value of <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#startPutting(short)"><CODE>startPutting(short)</CODE></A> and possible return value of <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getChannelID()"><CODE>getChannelID()</CODE></A> that
 indicates that this buffer is not intended to be passed to a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#clear()">clear</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turns the state of this buffer from any state into <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#INITIAL"><CODE>INITIAL</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#flip()">flip</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turns the state of this buffer from <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A> into <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#GETTING"><CODE>GETTING</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#formatContent(boolean)">formatContent</A></B>(boolean&nbsp;showHeader)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer">IBufferProvider</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getBufferProvider()">getBufferProvider</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A> that has provided this buffer and that this buffer will be returned to when its
 <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#release()"><CODE>release()</CODE></A> method is called.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getByteBuffer()">getByteBuffer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>ByteBuffer</code> that can be used for putting or getting data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getCapacity()">getCapacity</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the capacity of this buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getChannelID()">getChannelID</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the channel index value stored in the header of this buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/IErrorHandler.html?is-external=true" title="class or interface in org.eclipse.net4j.util">IErrorHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getErrorHandler()">getErrorHandler</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html" title="enum in org.eclipse.net4j.buffer">BufferState</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getState()">getState</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the internal state of this buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#isEOS()">isEOS</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <em>End Of Stream</em> flag to indicate whether this buffer is the last buffer in a stream of buffers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#release()">release</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases this buffer to its original <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#setEOS(boolean)">setEOS</A></B>(boolean&nbsp;eos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <em>End Of Stream</em> flag to indicate whether this buffer is the last buffer in a stream of buffers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#setErrorHandler(org.eclipse.net4j.util.IErrorHandler)">setErrorHandler</A></B>(<A HREF="../../../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/IErrorHandler.html?is-external=true" title="class or interface in org.eclipse.net4j.util">IErrorHandler</A>&nbsp;errorHandler)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#startGetting(java.nio.channels.SocketChannel)">startGetting</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels">SocketChannel</A>&nbsp;socketChannel)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to read a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> from a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A> that can be used for getting data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#startPutting(short)">startPutting</A></B>(short&nbsp;channelID)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> that can be used for putting data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#write(java.nio.channels.SocketChannel)">write</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels">SocketChannel</A>&nbsp;socketChannel)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to write the data of this buffer to a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="NO_CHANNEL"><!-- --></A><H3>
NO_CHANNEL</H3>
<PRE>
static final short <B>NO_CHANNEL</B></PRE>
<DL>
<DD>Possible argument value of <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#startPutting(short)"><CODE>startPutting(short)</CODE></A> and possible return value of <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getChannelID()"><CODE>getChannelID()</CODE></A> that
 indicates that this buffer is not intended to be passed to a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.eclipse.net4j.buffer.IBuffer.NO_CHANNEL">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="MIN_CHANNEL"><!-- --></A><H3>
MIN_CHANNEL</H3>
<PRE>
static final short <B>MIN_CHANNEL</B></PRE>
<DL>
<DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.eclipse.net4j.buffer.IBuffer.MIN_CHANNEL">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="MAX_CHANNEL"><!-- --></A><H3>
MAX_CHANNEL</H3>
<PRE>
static final short <B>MAX_CHANNEL</B></PRE>
<DL>
<DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.eclipse.net4j.buffer.IBuffer.MAX_CHANNEL">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HEADER_SIZE"><!-- --></A><H3>
HEADER_SIZE</H3>
<PRE>
static final short <B>HEADER_SIZE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.eclipse.net4j.buffer.IBuffer.HEADER_SIZE">Constant Field Values</A></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getBufferProvider()"><!-- --></A><H3>
getBufferProvider</H3>
<PRE>
<A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer">IBufferProvider</A> <B>getBufferProvider</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A> that has provided this buffer and that this buffer will be returned to when its
 <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#release()"><CODE>release()</CODE></A> method is called.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getChannelID()"><!-- --></A><H3>
getChannelID</H3>
<PRE>
short <B>getChannelID</B>()</PRE>
<DL>
<DD>Returns the channel index value stored in the header of this buffer.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCapacity()"><!-- --></A><H3>
getCapacity</H3>
<PRE>
short <B>getCapacity</B>()</PRE>
<DL>
<DD>Returns the capacity of this buffer.
 <p>
 The capacity of this buffer is equal to the <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html#getBufferCapacity()"><CODE>capacity</CODE></A> of the
 <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A> that has provided this buffer.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getState()"><!-- --></A><H3>
getState</H3>
<PRE>
<A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html" title="enum in org.eclipse.net4j.buffer">BufferState</A> <B>getState</B>()</PRE>
<DL>
<DD>Returns the internal state of this buffer.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="startGetting(java.nio.channels.SocketChannel)"><!-- --></A><H3>
startGetting</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>startGetting</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels">SocketChannel</A>&nbsp;socketChannel)
                        throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A>,
                               <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Tries to read a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> from a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A> that can be used for getting data.
 <p>
 This method is non-blocking and it can be necessary to repeatedly call it. If it was not possible to read a
 complete header from the <code>SocketChannel</code> <code>null</code> is returned and the state of this buffer is
 <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#READING_HEADER"><CODE>READING_HEADER</CODE></A>. If it was not possible to read a complete body from the
 <code>SocketChannel</code> <code>null</code> is returned and the state of this buffer is
 <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#READING_BODY"><CODE>READING_BODY</CODE></A>.
 <p>
 If a <code>ByteBuffer</code> is returned it <b>may only</b> be used for getting data. It is left to the
 responsibility of the caller that only the following methods of that <code>ByteBuffer</code> are used:
 <ul>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#get()" title="class or interface in java.nio"><CODE>ByteBuffer.get()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#get(byte[])" title="class or interface in java.nio"><CODE>ByteBuffer.get(byte[])</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#get(int)" title="class or interface in java.nio"><CODE>ByteBuffer.get(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#get(byte[], int, int)" title="class or interface in java.nio"><CODE>ByteBuffer.get(byte[], int, int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getChar()" title="class or interface in java.nio"><CODE>ByteBuffer.getChar()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getChar(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getChar(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getDouble()" title="class or interface in java.nio"><CODE>ByteBuffer.getDouble()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getDouble(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getDouble(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getFloat()" title="class or interface in java.nio"><CODE>ByteBuffer.getFloat()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getFloat(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getFloat(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getInt()" title="class or interface in java.nio"><CODE>ByteBuffer.getInt()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getInt(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getInt(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getLong()" title="class or interface in java.nio"><CODE>ByteBuffer.getLong()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getLong(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getLong(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getShort()" title="class or interface in java.nio"><CODE>ByteBuffer.getShort()</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#getShort(int)" title="class or interface in java.nio"><CODE>ByteBuffer.getShort(int)</CODE></A>
 <li>all other methods that do not influence <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#position()" title="class or interface in java.nio"><CODE>Buffer.position()</CODE></A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#limit()" title="class or interface in java.nio"><CODE>Buffer.limit()</CODE></A> and
 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#capacity()" title="class or interface in java.nio"><CODE>Buffer.capacity()</CODE></A>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>socketChannel</CODE> - The <code>socketChannel</code> to read the <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> from.
<DT><B>Returns:</B><DD>A <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> that can be used for getting data if it was possible to completely read the data from
         the given <code>SocketChannel</code>, <code>null</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the state of this buffer is not <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#INITIAL"><CODE>INITIAL</CODE></A>,
           <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#READING_HEADER"><CODE>READING_HEADER</CODE></A> or <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#READING_BODY"><CODE>READING_BODY</CODE></A>.
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the <code>SocketChannel</code> has been closed or discovers other I/O problems.</DL>
</DD>
</DL>
<HR>

<A NAME="startPutting(short)"><!-- --></A><H3>
startPutting</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>startPutting</B>(short&nbsp;channelID)
                        throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Returns a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> that can be used for putting data.
 <p>
 Turns the <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#getState()"><CODE>state</CODE></A> of this buffer into <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A>.
 <p>
 The returned <code>ByteBuffer</code> <b>may only</b> be used for putting data. It is left to the responsibility of
 the caller that only the following methods of that <code>ByteBuffer</code> are used:
 <ul>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#put(byte)" title="class or interface in java.nio"><CODE>ByteBuffer.put(byte)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#put(byte[])" title="class or interface in java.nio"><CODE>ByteBuffer.put(byte[])</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#put(java.nio.ByteBuffer)" title="class or interface in java.nio"><CODE>ByteBuffer.put(ByteBuffer)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#put(int, byte)" title="class or interface in java.nio"><CODE>ByteBuffer.put(int, byte)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#put(byte[], int, int)" title="class or interface in java.nio"><CODE>ByteBuffer.put(byte[], int, int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putChar(char)" title="class or interface in java.nio"><CODE>ByteBuffer.putChar(char)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putChar(int, char)" title="class or interface in java.nio"><CODE>ByteBuffer.putChar(int, char)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putDouble(double)" title="class or interface in java.nio"><CODE>ByteBuffer.putDouble(double)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putDouble(int, double)" title="class or interface in java.nio"><CODE>ByteBuffer.putDouble(int, double)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putFloat(float)" title="class or interface in java.nio"><CODE>ByteBuffer.putFloat(float)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putFloat(int, float)" title="class or interface in java.nio"><CODE>ByteBuffer.putFloat(int, float)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putInt(int)" title="class or interface in java.nio"><CODE>ByteBuffer.putInt(int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putInt(int, int)" title="class or interface in java.nio"><CODE>ByteBuffer.putInt(int, int)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putLong(long)" title="class or interface in java.nio"><CODE>ByteBuffer.putLong(long)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putLong(int, long)" title="class or interface in java.nio"><CODE>ByteBuffer.putLong(int, long)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putShort(short)" title="class or interface in java.nio"><CODE>ByteBuffer.putShort(short)</CODE></A>
 <li> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true#putShort(int, short)" title="class or interface in java.nio"><CODE>ByteBuffer.putShort(int, short)</CODE></A>
 <li>all other methods that do not influence <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#position()" title="class or interface in java.nio"><CODE>Buffer.position()</CODE></A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#limit()" title="class or interface in java.nio"><CODE>Buffer.limit()</CODE></A> and
 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/Buffer.html?is-external=true#capacity()" title="class or interface in java.nio"><CODE>Buffer.capacity()</CODE></A>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>channelID</CODE> - The index of an <A HREF="../../../../org/eclipse/net4j/channel/IChannel.html" title="interface in org.eclipse.net4j.channel"><CODE>IChannel</CODE></A> that this buffer is intended to be passed to later or <A HREF="../../../../org/eclipse/net4j/buffer/IBuffer.html#NO_CHANNEL"><CODE>NO_CHANNEL</CODE></A>
          .
<DT><B>Returns:</B><DD>A <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><CODE>ByteBuffer</CODE></A> that can be used for putting data.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the state of this buffer is not <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#INITIAL"><CODE>INITIAL</CODE></A> (<A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A> is allowed but meaningless if and only if the given <code>channelID</code> is equal to the
           existing <code>channelID</code> of this buffer).</DL>
</DD>
</DL>
<HR>

<A NAME="write(java.nio.channels.SocketChannel)"><!-- --></A><H3>
write</H3>
<PRE>
boolean <B>write</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels">SocketChannel</A>&nbsp;socketChannel)
              throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A>,
                     <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Tries to write the data of this buffer to a <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html?is-external=true" title="class or interface in java.nio.channels"><CODE>SocketChannel</CODE></A>.
 <p>
 This method is non-blocking and it can be necessary to repeatedly call it. If it was not possible to completely
 write the data to the <code>SocketChannel</code> <code>false</code> is returned and the state of this buffer
 remains <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#WRITING"><CODE>WRITING</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>socketChannel</CODE> - The <code>socketChannel</code> to write the data to.
<DT><B>Returns:</B><DD><code>true</code> if it was possible to completely write the data to the <code>SocketChannel</code>,
         <code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the state of this buffer is not <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A> or <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#WRITING"><CODE>WRITING</CODE></A>.
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the <code>SocketChannel</code> has been closed or discovers other I/O problems.</DL>
</DD>
</DL>
<HR>

<A NAME="flip()"><!-- --></A><H3>
flip</H3>
<PRE>
void <B>flip</B>()
          throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Turns the state of this buffer from <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A> into <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#GETTING"><CODE>GETTING</CODE></A>.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the state of this buffer is not <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A>.</DL>
</DD>
</DL>
<HR>

<A NAME="getByteBuffer()"><!-- --></A><H3>
getByteBuffer</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>getByteBuffer</B>()
                         throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Returns the <code>ByteBuffer</code> that can be used for putting or getting data.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the state of this buffer is not <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#PUTTING"><CODE>PUTTING</CODE></A> or <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#GETTING"><CODE>GETTING</CODE></A>.</DL>
</DD>
</DL>
<HR>

<A NAME="isEOS()"><!-- --></A><H3>
isEOS</H3>
<PRE>
boolean <B>isEOS</B>()</PRE>
<DL>
<DD>Returns the <em>End Of Stream</em> flag to indicate whether this buffer is the last buffer in a stream of buffers.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setEOS(boolean)"><!-- --></A><H3>
setEOS</H3>
<PRE>
void <B>setEOS</B>(boolean&nbsp;eos)</PRE>
<DL>
<DD>Sets the <em>End Of Stream</em> flag to indicate whether this buffer is the last buffer in a stream of buffers.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="release()"><!-- --></A><H3>
release</H3>
<PRE>
void <B>release</B>()</PRE>
<DL>
<DD>Releases this buffer to its original <A HREF="../../../../org/eclipse/net4j/buffer/IBufferProvider.html" title="interface in org.eclipse.net4j.buffer"><CODE>IBufferProvider</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="clear()"><!-- --></A><H3>
clear</H3>
<PRE>
void <B>clear</B>()</PRE>
<DL>
<DD>Turns the state of this buffer from any state into <A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html#INITIAL"><CODE>INITIAL</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="formatContent(boolean)"><!-- --></A><H3>
formatContent</H3>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>formatContent</B>(boolean&nbsp;showHeader)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getErrorHandler()"><!-- --></A><H3>
getErrorHandler</H3>
<PRE>
<A HREF="../../../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/IErrorHandler.html?is-external=true" title="class or interface in org.eclipse.net4j.util">IErrorHandler</A> <B>getErrorHandler</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="setErrorHandler(org.eclipse.net4j.util.IErrorHandler)"><!-- --></A><H3>
setErrorHandler</H3>
<PRE>
void <B>setErrorHandler</B>(<A HREF="../../../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/IErrorHandler.html?is-external=true" title="class or interface in org.eclipse.net4j.util">IErrorHandler</A>&nbsp;errorHandler)</PRE>
<DL>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/IBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/BufferState.html" title="enum in org.eclipse.net4j.buffer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/eclipse/net4j/buffer/IBufferHandler.html" title="interface in org.eclipse.net4j.buffer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/eclipse/net4j/buffer/IBuffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="IBuffer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<i>Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.</i>
</BODY>
</HTML>

Back to the top