Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* ====================================================================
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
     The ASF licenses this file to You under the Apache License, Version 2.0
     (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
 
 package org.apache.poi.hwpf.model.types;
 
Field Descriptor (FLD).

Class and fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/records/definitions.

Author(s):
Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format Specification [*.doc]
 
 public abstract class FLDAbstractType implements HDFType
 {
 
     protected byte field_1_chHolder;
     private static BitField ch = new BitField( 0x1f );
     private static BitField reserved = new BitField( 0xe0 );
     protected byte field_2_flt;
     private static BitField fDiffer = new BitField( 0x01 );
     private static BitField fZombieEmbed = new BitField( 0x02 );
     private static BitField fResultDirty = new BitField( 0x04 );
     private static BitField fResultEdited = new BitField( 0x08 );
     private static BitField fLocked = new BitField( 0x10 );
     private static BitField fPrivateResult = new BitField( 0x20 );
     private static BitField fNested = new BitField( 0x40 );
     private static BitField fHasSep = new BitField( 0x40 );
 
     public FLDAbstractType()
     {
 
     }
 
     protected void fillFieldsbyte[] dataint offset )
     {
          = data[0x0 + offset];
          = data[0x1 + offset];
     }
 
     public void serializebyte[] dataint offset )
     {
         data[0x0 + offset] = ;
         data[0x1 + offset] = ;
     }
 
     public String toString()
     {
         StringBuffer buffer = new StringBuffer();
 
         buffer.append"[FLD]\n" );
 
         buffer.append"    .chHolder             = " );
         buffer.append" (" ).appendgetChHolder() ).append" )\n" );
         buffer.append"         .ch                       = " )
                 .appendgetCh() ).append'\n' );
         buffer.append"         .reserved                 = " )
                 .appendgetReserved() ).append'\n' );
 
         buffer.append"    .flt                  = " );
         buffer.append" (" ).appendgetFlt() ).append" )\n" );
         buffer.append"         .fDiffer                  = " )
                 .appendisFDiffer() ).append'\n' );
         buffer.append"         .fZombieEmbed             = " )
                 .appendisFZombieEmbed() ).append'\n' );
         buffer.append"         .fResultDirty             = " )
                 .appendisFResultDirty() ).append'\n' );
         buffer.append"         .fResultEdited            = " )
                 .appendisFResultEdited() ).append'\n' );
         buffer.append"         .fLocked                  = " )
                 .appendisFLocked() ).append'\n' );
         buffer.append"         .fPrivateResult           = " )
                 .appendisFPrivateResult() ).append'\n' );
         buffer.append"         .fNested                  = " )
                 .appendisFNested() ).append'\n' );
         buffer.append"         .fHasSep                  = " )
                .appendisFHasSep() ).append'\n' );
        buffer.append"[/FLD]\n" );
        return buffer.toString();
    }

    
Size of record (exluding 4 byte header)
    public static int getSize()
    {
        return 4 + +1 + 1;
    }

    
ch field holder (along with reserved bits).
    public byte getChHolder()
    {
        return ;
    }

    
ch field holder (along with reserved bits).
    public void setChHolderbyte field_1_chHolder )
    {
        this. = field_1_chHolder;
    }

    
Field type when ch == 19 OR field flags when ch == 21 .
    public byte getFlt()
    {
        return ;
    }

    
Field type when ch == 19 OR field flags when ch == 21 .
    public void setFltbyte field_2_flt )
    {
        this. = field_2_flt;
    }

    
Sets the ch field value. Type of field boundary the FLD describes: 19 -- field begin mark, 20 -- field separation mark; 21 -- field end mark
    public void setChbyte value )
    {
         = (byte.setValuevalue );
    }

    
Type of field boundary the FLD describes: 19 -- field begin mark, 20 -- field separation mark; 21 -- field end mark

Returns:
the ch field value.
    public byte getCh()
    {
        return (byte.getValue );
    }

    
Sets the reserved field value. Reserved
    public void setReservedbyte value )
    {
         = (byte.setValuevalue );
    }

    
Reserved

Returns:
the reserved field value.
    public byte getReserved()
    {
        return (byte.getValue );
    }

    
Sets the fDiffer field value. Ignored for saved file
    public void setFDifferboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
Ignored for saved file

Returns:
the fDiffer field value.
    public boolean isFDiffer()
    {
        return .isSet );
    }

    
Sets the fZombieEmbed field value. ==1 when result still believes this field is an EMBED or LINK field
    public void setFZombieEmbedboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when result still believes this field is an EMBED or LINK field

Returns:
the fZombieEmbed field value.
    public boolean isFZombieEmbed()
    {
        return .isSet );
    }

    
Sets the fResultDirty field value. ==1 when user has edited or formatted the result. == 0 otherwise
    public void setFResultDirtyboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when user has edited or formatted the result. == 0 otherwise

Returns:
the fResultDirty field value.
    public boolean isFResultDirty()
    {
        return .isSet );
    }

    
Sets the fResultEdited field value. ==1 when user has inserted text into or deleted text from the result
    public void setFResultEditedboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when user has inserted text into or deleted text from the result

Returns:
the fResultEdited field value.
    public boolean isFResultEdited()
    {
        return .isSet );
    }

    
Sets the fLocked field value. ==1 when field is locked from recalculation
    public void setFLockedboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when field is locked from recalculation

Returns:
the fLocked field value.
    public boolean isFLocked()
    {
        return .isSet );
    }

    
Sets the fPrivateResult field value. ==1 whenever the result of the field is never to be shown
    public void setFPrivateResultboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 whenever the result of the field is never to be shown

Returns:
the fPrivateResult field value.
    public boolean isFPrivateResult()
    {
        return .isSet );
    }

    
Sets the fNested field value. ==1 when field is nested within another field
    public void setFNestedboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when field is nested within another field

Returns:
the fNested field value.
    public boolean isFNested()
    {
        return .isSet );
    }

    
Sets the fHasSep field value. ==1 when field has a field separator
    public void setFHasSepboolean value )
    {
         = (byte.setBooleanvalue );
    }

    
==1 when field has a field separator

Returns:
the fHasSep field value.
    public boolean isFHasSep()
    {
        return .isSet );
    }
// END OF CLASS
New to GrepCode? Check out our FAQ X