EMMA Coverage Report (generated Tue Dec 20 11:01:01 KST 2005)
[all classes][org.apache.mina.common]

COVERAGE SUMMARY FOR SOURCE FILE [ByteBufferProxy.java]

nameclass, %method, %block, %line, %
ByteBufferProxy.java0%   (0/1)0%   (0/84)0%   (0/482)0%   (0/128)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ByteBufferProxy0%   (0/1)0%   (0/84)0%   (0/482)0%   (0/128)
ByteBufferProxy (ByteBuffer): void 0%   (0/1)0%   (0/13)0%   (0/5)
acquire (): void 0%   (0/1)0%   (0/4)0%   (0/2)
asCharBuffer (): CharBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
asDoubleBuffer (): DoubleBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
asFloatBuffer (): FloatBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
asIntBuffer (): IntBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
asLongBuffer (): LongBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
asShortBuffer (): ShortBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
buf (): ByteBuffer 0%   (0/1)0%   (0/4)0%   (0/1)
capacity (): int 0%   (0/1)0%   (0/4)0%   (0/1)
clear (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
compact (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
compareTo (ByteBuffer): int 0%   (0/1)0%   (0/5)0%   (0/1)
equals (Object): boolean 0%   (0/1)0%   (0/5)0%   (0/1)
fill (byte, int): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
fill (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
fillAndReset (byte, int): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
fillAndReset (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
flip (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
get (): byte 0%   (0/1)0%   (0/4)0%   (0/1)
get (byte []): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
get (byte [], int, int): ByteBuffer 0%   (0/1)0%   (0/9)0%   (0/2)
get (int): byte 0%   (0/1)0%   (0/5)0%   (0/1)
getChar (): char 0%   (0/1)0%   (0/4)0%   (0/1)
getChar (int): char 0%   (0/1)0%   (0/5)0%   (0/1)
getDouble (): double 0%   (0/1)0%   (0/4)0%   (0/1)
getDouble (int): double 0%   (0/1)0%   (0/5)0%   (0/1)
getFloat (): float 0%   (0/1)0%   (0/4)0%   (0/1)
getFloat (int): float 0%   (0/1)0%   (0/5)0%   (0/1)
getHexDump (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getInt (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getInt (int): int 0%   (0/1)0%   (0/5)0%   (0/1)
getLong (): long 0%   (0/1)0%   (0/4)0%   (0/1)
getLong (int): long 0%   (0/1)0%   (0/5)0%   (0/1)
getShort (): short 0%   (0/1)0%   (0/4)0%   (0/1)
getShort (int): short 0%   (0/1)0%   (0/5)0%   (0/1)
getString (CharsetDecoder): String 0%   (0/1)0%   (0/5)0%   (0/1)
getString (int, CharsetDecoder): String 0%   (0/1)0%   (0/6)0%   (0/1)
getUnsigned (): short 0%   (0/1)0%   (0/4)0%   (0/1)
getUnsigned (int): short 0%   (0/1)0%   (0/5)0%   (0/1)
getUnsignedInt (): long 0%   (0/1)0%   (0/4)0%   (0/1)
getUnsignedInt (int): long 0%   (0/1)0%   (0/5)0%   (0/1)
getUnsignedShort (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getUnsignedShort (int): int 0%   (0/1)0%   (0/5)0%   (0/1)
hasRemaining (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/4)0%   (0/1)
isAutoExpand (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
isDirect (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
isPooled (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
limit (): int 0%   (0/1)0%   (0/4)0%   (0/1)
limit (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
mark (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
order (): ByteOrder 0%   (0/1)0%   (0/4)0%   (0/1)
order (ByteOrder): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
position (): int 0%   (0/1)0%   (0/4)0%   (0/1)
position (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
put (ByteBuffer): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
put (ByteBuffer): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
put (byte []): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
put (byte [], int, int): ByteBuffer 0%   (0/1)0%   (0/9)0%   (0/2)
put (byte): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
put (int, byte): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putChar (char): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putChar (int, char): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putDouble (double): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putDouble (int, double): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putFloat (float): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putFloat (int, float): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putInt (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putInt (int, int): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putLong (int, long): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putLong (long): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putShort (int, short): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putShort (short): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
putString (CharSequence, CharsetEncoder): ByteBuffer 0%   (0/1)0%   (0/8)0%   (0/2)
putString (CharSequence, int, CharsetEncoder): ByteBuffer 0%   (0/1)0%   (0/9)0%   (0/2)
release (): void 0%   (0/1)0%   (0/4)0%   (0/2)
remaining (): int 0%   (0/1)0%   (0/4)0%   (0/1)
reset (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
rewind (): ByteBuffer 0%   (0/1)0%   (0/6)0%   (0/2)
setAutoExpand (boolean): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
setPooled (boolean): void 0%   (0/1)0%   (0/5)0%   (0/2)
skip (int): ByteBuffer 0%   (0/1)0%   (0/7)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/4)0%   (0/1)

1/*
2 *   @(#) $Id: ByteBufferProxy.java 357871 2005-12-20 01:56:40Z trustin $
3 *
4 *   Copyright 2004 The Apache Software Foundation
5 *
6 *   Licensed under the Apache License, Version 2.0 (the "License");
7 *   you may not use this file except in compliance with the License.
8 *   You may obtain a copy of the License at
9 *
10 *       http://www.apache.org/licenses/LICENSE-2.0
11 *
12 *   Unless required by applicable law or agreed to in writing, software
13 *   distributed under the License is distributed on an "AS IS" BASIS,
14 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 *   See the License for the specific language governing permissions and
16 *   limitations under the License.
17 *
18 */package org.apache.mina.common;
19 
20import java.io.FilterOutputStream;
21import java.nio.ByteOrder;
22import java.nio.CharBuffer;
23import java.nio.DoubleBuffer;
24import java.nio.FloatBuffer;
25import java.nio.IntBuffer;
26import java.nio.LongBuffer;
27import java.nio.ShortBuffer;
28import java.nio.charset.CharacterCodingException;
29import java.nio.charset.CharsetDecoder;
30import java.nio.charset.CharsetEncoder;
31 
32/**
33 * A {@link ByteBuffer} that wraps a buffer and proxies any operations to it.
34 * <p>
35 * You can think this class like a {@link FilterOutputStream}.  All operations
36 * are proxied by default so that you can extend this class and override existing
37 * operations selectively.  You can introduce new operations, too.
38 * 
39 * @author The Apache Directory Project (dev@directory.apache.org)
40 * @version $Rev: 357871 $, $Date: 2005-12-20 10:56:40 +0900 (Tue, 20 Dec 2005) $
41 */
42public class ByteBufferProxy extends ByteBuffer
43{
44 
45    /**
46     * The buffer proxied by this proxy.
47     */
48    protected ByteBuffer buf;
49 
50    /**
51     * Create a new instance.
52     * @param buf the buffer to be proxied
53     */
54    protected ByteBufferProxy( ByteBuffer buf )
55    {
56        if( buf == null )
57        {
58            throw new NullPointerException( "buf" );
59        }
60        this.buf = buf;
61    }
62 
63    public void acquire()
64    {
65        buf.acquire();
66    }
67 
68    public void release()
69    {
70        buf.release();
71    }
72 
73    public boolean isDirect()
74    {
75        return buf.isDirect();
76    }
77 
78    public java.nio.ByteBuffer buf()
79    {
80        return buf.buf();
81    }
82 
83    public int capacity()
84    {
85        return buf.capacity();
86    }
87 
88    public int position()
89    {
90        return buf.position();
91    }
92 
93    public ByteBuffer position( int newPosition )
94    {
95        buf.position( newPosition );
96        return this;
97    }
98 
99    public int limit()
100    {
101        return buf.limit();
102    }
103 
104    public ByteBuffer limit( int newLimit )
105    {
106        buf.limit( newLimit );
107        return this;
108    }
109 
110    public ByteBuffer mark()
111    {
112        buf.mark();
113        return this;
114    }
115 
116    public ByteBuffer reset()
117    {
118        buf.reset();
119        return this;
120    }
121 
122    public ByteBuffer clear()
123    {
124        buf.clear();
125        return this;
126    }
127 
128    public ByteBuffer flip()
129    {
130        buf.flip();
131        return this;
132    }
133 
134    public ByteBuffer rewind()
135    {
136        buf.rewind();
137        return this;
138    }
139 
140    public int remaining()
141    {
142        return buf.remaining();
143    }
144 
145    public boolean hasRemaining()
146    {
147        return buf.hasRemaining();
148    }
149 
150    public byte get()
151    {
152        return buf.get();
153    }
154 
155    public short getUnsigned()
156    {
157        return buf.getUnsigned();
158    }
159 
160    public ByteBuffer put( byte b )
161    {
162        buf.put( b );
163        return this;
164    }
165 
166    public byte get( int index )
167    {
168        return buf.get( index );
169    }
170 
171    public short getUnsigned( int index )
172    {
173        return buf.getUnsigned( index );
174    }
175 
176    public ByteBuffer put( int index, byte b )
177    {
178        buf.put( index, b );
179        return this;
180    }
181 
182    public ByteBuffer get( byte[] dst, int offset, int length )
183    {
184        buf.get( dst, offset, length );
185        return this;
186    }
187 
188    public ByteBuffer get( byte[] dst )
189    {
190        buf.get( dst );
191        return this;
192    }
193 
194    public ByteBuffer put( ByteBuffer src )
195    {
196        buf.put( src );
197        return this;
198    }
199 
200    public ByteBuffer put( java.nio.ByteBuffer src )
201    {
202        buf.put( src );
203        return this;
204    }
205 
206    public ByteBuffer put( byte[] src, int offset, int length )
207    {
208        buf.put( src, offset, length );
209        return this;
210    }
211 
212    public ByteBuffer put( byte[] src )
213    {
214        buf.put( src );
215        return this;
216    }
217 
218    public ByteBuffer compact()
219    {
220        buf.compact();
221        return this;
222    }
223 
224    public String toString()
225    {
226        return buf.toString();
227    }
228 
229    public int hashCode()
230    {
231        return buf.hashCode();
232    }
233 
234    public boolean equals( Object ob )
235    {
236        return buf.equals( ob );
237    }
238 
239    public int compareTo( ByteBuffer that )
240    {
241        return buf.compareTo( that );
242    }
243 
244    public ByteOrder order()
245    {
246        return buf.order();
247    }
248 
249    public ByteBuffer order( ByteOrder bo )
250    {
251        buf.order( bo );
252        return this;
253    }
254 
255    public char getChar()
256    {
257        return buf.getChar();
258    }
259 
260    public ByteBuffer putChar( char value )
261    {
262        buf.putChar( value );
263        return this;
264    }
265 
266    public char getChar( int index )
267    {
268        return buf.getChar( index );
269    }
270 
271    public ByteBuffer putChar( int index, char value )
272    {
273        buf.putChar( index, value );
274        return this;
275    }
276 
277    public CharBuffer asCharBuffer()
278    {
279        return buf.asCharBuffer();
280    }
281 
282    public short getShort()
283    {
284        return buf.getShort();
285    }
286 
287    public int getUnsignedShort()
288    {
289        return buf.getUnsignedShort();
290    }
291 
292    public ByteBuffer putShort( short value )
293    {
294        buf.putShort( value );
295        return this;
296    }
297 
298    public short getShort( int index )
299    {
300        return buf.getShort( index );
301    }
302 
303    public int getUnsignedShort( int index )
304    {
305        return buf.getUnsignedShort( index );
306    }
307 
308    public ByteBuffer putShort( int index, short value )
309    {
310        buf.putShort( index, value );
311        return this;
312    }
313 
314    public ShortBuffer asShortBuffer()
315    {
316        return buf.asShortBuffer();
317    }
318 
319    public int getInt()
320    {
321        return buf.getInt();
322    }
323 
324    public long getUnsignedInt()
325    {
326        return buf.getUnsignedInt();
327    }
328 
329    public ByteBuffer putInt( int value )
330    {
331        buf.putInt( value );
332        return this;
333    }
334 
335    public int getInt( int index )
336    {
337        return buf.getInt( index );
338    }
339 
340    public long getUnsignedInt( int index )
341    {
342        return buf.getUnsignedInt( index );
343    }
344 
345    public ByteBuffer putInt( int index, int value )
346    {
347        buf.putInt( index, value );
348        return this;
349    }
350 
351    public IntBuffer asIntBuffer()
352    {
353        return buf.asIntBuffer();
354    }
355 
356    public long getLong()
357    {
358        return buf.getLong();
359    }
360 
361    public ByteBuffer putLong( long value )
362    {
363        buf.putLong( value );
364        return this;
365    }
366 
367    public long getLong( int index )
368    {
369        return buf.getLong( index );
370    }
371 
372    public ByteBuffer putLong( int index, long value )
373    {
374        buf.putLong( index, value );
375        return this;
376    }
377 
378    public LongBuffer asLongBuffer()
379    {
380        return buf.asLongBuffer();
381    }
382 
383    public float getFloat()
384    {
385        return buf.getFloat();
386    }
387 
388    public ByteBuffer putFloat( float value )
389    {
390        buf.putFloat( value );
391        return this;
392    }
393 
394    public float getFloat( int index )
395    {
396        return buf.getFloat( index );
397    }
398 
399    public ByteBuffer putFloat( int index, float value )
400    {
401        buf.putFloat( index, value );
402        return this;
403    }
404 
405    public FloatBuffer asFloatBuffer()
406    {
407        return buf.asFloatBuffer();
408    }
409 
410    public double getDouble()
411    {
412        return buf.getDouble();
413    }
414 
415    public ByteBuffer putDouble( double value )
416    {
417        buf.putDouble( value );
418        return this;
419    }
420 
421    public double getDouble( int index )
422    {
423        return buf.getDouble( index );
424    }
425 
426    public ByteBuffer putDouble( int index, double value )
427    {
428        buf.putDouble( index, value );
429        return this;
430    }
431 
432    public DoubleBuffer asDoubleBuffer()
433    {
434        return buf.asDoubleBuffer();
435    }
436 
437    public String getHexDump()
438    {
439        return buf.getHexDump();
440    }
441 
442    public String getString( int fieldSize, CharsetDecoder decoder )
443            throws CharacterCodingException
444    {
445        return buf.getString( fieldSize, decoder );
446    }
447 
448    public String getString( CharsetDecoder decoder )
449            throws CharacterCodingException
450    {
451        return buf.getString( decoder );
452    }
453 
454    public ByteBuffer putString( CharSequence in, int fieldSize,
455                                CharsetEncoder encoder )
456            throws CharacterCodingException
457    {
458        buf.putString( in, fieldSize, encoder );
459        return this;
460    }
461 
462    public ByteBuffer putString( CharSequence in, CharsetEncoder encoder )
463            throws CharacterCodingException
464    {
465        buf.putString( in, encoder );
466        return this;
467    }
468 
469    public ByteBuffer skip( int size )
470    {
471        buf.skip( size );
472        return this;
473    }
474 
475    public ByteBuffer fill( byte value, int size )
476    {
477        buf.fill( value, size );
478        return this;
479    }
480 
481    public ByteBuffer fillAndReset( byte value, int size )
482    {
483        buf.fillAndReset( value, size );
484        return this;
485    }
486 
487    public ByteBuffer fill( int size )
488    {
489        buf.fill( size );
490        return this;
491    }
492 
493    public ByteBuffer fillAndReset( int size )
494    {
495        buf.fillAndReset( size );
496        return this;
497    }
498 
499    public boolean isAutoExpand()
500    {
501        return buf.isAutoExpand();
502    }
503 
504    public ByteBuffer setAutoExpand( boolean autoExpand )
505    {
506        buf.setAutoExpand( autoExpand );
507        return this;
508    }
509 
510    public boolean isPooled()
511    {
512        return buf.isPooled();
513    }
514    
515    public void setPooled( boolean pooled )
516    {
517        buf.setPooled( pooled );
518    }
519}

[all classes][org.apache.mina.common]
EMMA 2.0.4217 (C) Vladimir Roubtsov