org.xBaseJ.fields
Class MemoField

java.lang.Object
  extended byorg.xBaseJ.fields.Field
      extended byorg.xBaseJ.fields.MemoField
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class MemoField
extends Field

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xBaseJ.fields.Field
buffer, bytebuffer, Deleted, Length, myoffset, Name, otherValidCharacters
 
Constructor Summary
MemoField()
           
MemoField(boolean inFoxPro)
           
MemoField(String iName)
          public method for creating a memo field object.
MemoField(String iName, boolean inFoxPro)
          public method for creating a FoxPro memo field object.
MemoField(String Name, java.nio.ByteBuffer inBuffer, DBTFile indbtobj)
           
 
Method Summary
 Object clone()
           
 String get()
          return the contents of the memo Field, variant of the field.get method
 byte[] getBytes()
          return the contents of the memo Field via its original byte array
 char getType()
          return the character 'M' indicating a memo field
 boolean isFoxPro()
           
 void put(byte[] inBytes)
          sets the contents of the memo Field, variant of the field.put method data not written into DBF until an update or write is issued.
 void put(String invalue)
          sets the contents of the memo Field, variant of the field.put method data not written into DBF until an update or write is issued.
 void read()
           
 void setDBTObj(DBTFile indbtobj)
           
 void update()
           
 void write()
           
 
Methods inherited from class org.xBaseJ.fields.Field
getDecimalPositionCount, getLength, getName, readExternal, setBuffer, setBufferSpace, setField, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoField

public MemoField()

MemoField

public MemoField(boolean inFoxPro)

MemoField

public MemoField(String Name,
                 java.nio.ByteBuffer inBuffer,
                 DBTFile indbtobj)
          throws xBaseJException,
                 IOException

MemoField

public MemoField(String iName)
          throws xBaseJException,
                 IOException
public method for creating a memo field object. It is not associated with a database but can be when used with some DBF methods.

Parameters:
iName - the name of the field
Throws:
xBaseJException - exception caused in calling methods
IOException - can not occur but defined for calling methods
See Also:
Field

MemoField

public MemoField(String iName,
                 boolean inFoxPro)
          throws xBaseJException,
                 IOException
public method for creating a FoxPro memo field object. It is not associated with a database but can be when used with some DBF methods.

Parameters:
iName - the name of the field
inFoxPro - - boolean
Throws:
xBaseJException - exception caused in calling methods
IOException - can not occur but defined for calling methods
See Also:
Field
Method Detail

isFoxPro

public boolean isFoxPro()

setDBTObj

public void setDBTObj(DBTFile indbtobj)

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Field
Throws:
CloneNotSupportedException

getType

public char getType()
return the character 'M' indicating a memo field

Overrides:
getType in class Field
Returns:
char field type

get

public String get()
return the contents of the memo Field, variant of the field.get method

Overrides:
get in class Field
Returns:
String field contents after any type of read.

getBytes

public byte[] getBytes()
return the contents of the memo Field via its original byte array

Overrides:
getBytes in class Field
Returns:
byte[] - if not set a null is returned.

read

public void read()
          throws IOException,
                 xBaseJException
Overrides:
read in class Field
Throws:
IOException
xBaseJException

put

public void put(String invalue)
sets the contents of the memo Field, variant of the field.put method data not written into DBF until an update or write is issued.

Overrides:
put in class Field
Parameters:
invalue - value to set Field to.

put

public void put(byte[] inBytes)
         throws xBaseJException
sets the contents of the memo Field, variant of the field.put method data not written into DBF until an update or write is issued.

Overrides:
put in class Field
Parameters:
inBytes - byte array value to set Field to.
Throws:
xBaseJException - value length too long

write

public void write()
           throws IOException,
                  xBaseJException
Overrides:
write in class Field
Throws:
IOException
xBaseJException

update

public void update()
            throws IOException,
                   xBaseJException
Overrides:
update in class Field
Throws:
IOException
xBaseJException


Copyright © 1997-2007 American Coders Ltd. All Rights Reserved.