KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > nio > CharBuffer

java.nio
Class CharBuffer

java.lang.Object
  extended by java.nio.Buffer
      extended by java.nio.CharBuffer
All Implemented Interfaces:
Appendable, CharSequence, Comparable<CharBuffer>, Readable
See Also:
Top Examples, Source Code, isDirect, wrapping, allocation, slicing, duplicating, compacting, bulk put, bulk get, put, get

public static CharBuffer allocate(int capacity)
See Also:
IllegalArgumentException, array offset, backing array
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer append(char c)
See Also:
ReadOnlyBufferException, BufferOverflowException, Appendable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer append(CharSequence csq)
See Also:
ReadOnlyBufferException, BufferOverflowException, Appendable, toString
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer append(CharSequence csq,
                         int start,
                         int end)
See Also:
ReadOnlyBufferException, IndexOutOfBoundsException, BufferOverflowException, Appendable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final char[] array()
See Also:
UnsupportedOperationException, ReadOnlyBufferException, hasArray
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final int arrayOffset()
See Also:
UnsupportedOperationException, ReadOnlyBufferException, hasArray
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharBuffer asReadOnlyBuffer()
See Also:
duplicate
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final char charAt(int index)
See Also:
IndexOutOfBoundsException, CharSequence
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[410]Get first character
By Anonymous on 2004/11/22 11:32:59  Rate
int index = 0; 
     String string1 = binary.charAt ( 0 ) ;


public abstract CharBuffer compact()
See Also:
ReadOnlyBufferException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int compareTo(CharBuffer that)
See Also:
Comparable, compareTo
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharBuffer duplicate()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object ob)
See Also:
Hashtable, Object.hashCode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract char get()
See Also:
BufferUnderflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1081]Flipping CharBuffer
By Anonymous on 2004/10/29 23:53:57  Rate
CharBuffer buff = ...; 
 buff.put ( 'A' ) ; 
 buff.flip (  ) ; 
 char c = buff.get (  ) ;  
 System.out.println ( "An A: " + c ) ; 
 


public CharBuffer get(char[] dst)
See Also:
BufferUnderflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer get(char[] dst,
                      int offset,
                      int length)
See Also:
IndexOutOfBoundsException, BufferUnderflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract char get(int index)
See Also:
IndexOutOfBoundsException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final boolean hasArray()
See Also:
arrayOffset, array
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
Hashtable, Object.equals(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract boolean isDirect()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final int length()
See Also:
CharSequence
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract ByteOrder order()
See Also:
native order
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharBuffer put(char c)
See Also:
ReadOnlyBufferException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final CharBuffer put(char[] src)
See Also:
ReadOnlyBufferException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer put(char[] src,
                      int offset,
                      int length)
See Also:
ReadOnlyBufferException, IndexOutOfBoundsException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharBuffer put(int index,
                               char c)
See Also:
ReadOnlyBufferException, IndexOutOfBoundsException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final CharBuffer put(String src)
See Also:
ReadOnlyBufferException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer put(String src,
                      int start,
                      int end)
See Also:
ReadOnlyBufferException, IndexOutOfBoundsException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public CharBuffer put(CharBuffer src)
See Also:
ReadOnlyBufferException, IllegalArgumentException, BufferOverflowException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int read(CharBuffer target)
         throws IOException
See Also:
ReadOnlyBufferException, NullPointerException, Readable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharBuffer slice()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract CharSequence subSequence(int start,
                                         int end)
See Also:
IndexOutOfBoundsException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toString()
See Also:
Object, CharSequence
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static CharBuffer wrap(char[] array)
See Also:
array offset, backing array
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1082]Wraps a string into a CharBuffer
By Anonymous on 2004/10/29 23:54:37  Rate
public class ReadBuff  {  
   public static void main ( String args [  ]  )   {  
      if  ( args.length != 0 )   {  
       CharBuffer buff = CharBuffer.wrap ( args [ 0 ]  ) ; 
       for  ( int i=0, n=buff.length (  ) ; i < n; i++ )   {  
         System.out.println ( i + " : " + buff.get (  )  ) ; 
        }  
      }  
    }  
  }  
 


public static CharBuffer wrap(char[] array,
                              int offset,
                              int length)
See Also:
IndexOutOfBoundsException, array offset, backing array
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static CharBuffer wrap(CharSequence csq)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static CharBuffer wrap(CharSequence csq,
                              int start,
                              int end)
See Also:
IndexOutOfBoundsException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags