org.xBaseJ.fields
Class PictureField

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

public class PictureField
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
PictureField()
           
PictureField(String iName)
          public method for creating a picture field object.
PictureField(String Name, java.nio.ByteBuffer inBuffer, DBTFile indbtobj)
           
 
Method Summary
 Object clone()
           
 String get()
          return the contents of the picture Field, variant of the field.get method
 byte[] getBytes()
          return the contents of the picture Field via its original byte array
 char getType()
          return the character 'P' indicating a picture field
 void put(byte[] inBytes)
          sets the contents of the picture 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 picture 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

PictureField

public PictureField()

PictureField

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

PictureField

public PictureField(String iName)
             throws xBaseJException,
                    IOException
public method for creating a picture 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
Method Detail

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 'P' indicating a picture field

Overrides:
getType in class Field
Returns:
char field type

get

public String get()
return the contents of the picture 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 picture 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)
         throws xBaseJException
sets the contents of the picture 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.
Throws:
xBaseJException - value length too long

put

public void put(byte[] inBytes)
         throws xBaseJException
sets the contents of the picture 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 - 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.