public int getFcEnd() { return propertyNode.getEnd(); }
public int getFcEnd() { return propertyNode.getEnd(); }
public int getNoteTextEndOffset( int index ) { return notesTables.getTextPosition( index ).getEnd(); }
public int getNoteTextEndOffset( int index ) { return notesTables.getTextPosition( index ).getEnd(); }
@Override public String toString() { return "GenericPropertyNode [" + getStart() + "; " + getEnd() + ") " + ( getBytes() != null ? getBytes().length + " byte(s)" : "null" ); } }
@Override public String toString() { return "GenericPropertyNode [" + getStart() + "; " + getEnd() + ") " + ( getBytes() != null ? getBytes().length + " byte(s)" : "null" ); } }
public byte[] toByteArray() { int size = _props.size(); int cpBufSize = ( ( size + 1 ) * LittleEndian.INT_SIZE ); int structBufSize = +( _cbStruct * size ); int bufSize = cpBufSize + structBufSize; byte[] buf = new byte[bufSize]; GenericPropertyNode node = null; for ( int x = 0; x < size; x++ ) { node = _props.get( x ); // put the starting offset of the property into the plcf. LittleEndian.putInt( buf, ( LittleEndian.INT_SIZE * x ), node.getStart() ); // put the struct into the plcf System.arraycopy( node.getBytes(), 0, buf, cpBufSize + ( x * _cbStruct ), _cbStruct ); } // put the ending offset of the last property into the plcf. LittleEndian.putInt( buf, LittleEndian.INT_SIZE * size, node.getEnd() ); return buf; }
public int getEnd() { int currentIndex = bookmarksTables.getDescriptorFirstIndex( first ); try { GenericPropertyNode descriptorLim = bookmarksTables .getDescriptorLim( currentIndex ); return descriptorLim.getStart(); } catch ( IndexOutOfBoundsException exc ) { return first.getEnd(); } }
public int getEnd() { int currentIndex = bookmarksTables.getDescriptorFirstIndex( first ); try { GenericPropertyNode descriptorLim = bookmarksTables .getDescriptorLim( currentIndex ); return descriptorLim.getStart(); } catch ( IndexOutOfBoundsException exc ) { return first.getEnd(); } }
public byte[] toByteArray() { int size = _props.size(); int cpBufSize = ((size + 1) * LittleEndian.INT_SIZE); int structBufSize = +(_cbStruct * size); int bufSize = cpBufSize + structBufSize; byte[] buf = IOUtils.safelyAllocate(bufSize, MAX_RECORD_LENGTH); int nodeEnd = 0; for (int x = 0; x < size; x++) { GenericPropertyNode node = _props.get(x); nodeEnd = node.getEnd(); // put the starting offset of the property into the plcf. LittleEndian.putInt(buf, (LittleEndian.INT_SIZE * x), node.getStart()); // put the struct into the plcf System.arraycopy(node.getBytes(), 0, buf, cpBufSize + (x * _cbStruct), _cbStruct); } // put the ending offset of the last property into the plcf. LittleEndian.putInt(buf, LittleEndian.INT_SIZE * size, nodeEnd); return buf; }
private Range getSubrangeAt( int plcfHddIndex ) { if ( plcfHdd == null ) return null; GenericPropertyNode prop = plcfHdd.getProperty( plcfHddIndex ); if ( prop.getStart() == prop.getEnd() ) { // Empty story return null; } if ( prop.getEnd() < prop.getStart() ) { // Broken properties? return null; } final int headersLength = headerStories.getEndOffset() - headerStories.getStartOffset(); int start = Math.min( prop.getStart(), headersLength ); int end = Math.min( prop.getEnd(), headersLength ); return new Range( headerStories.getStartOffset() + start, headerStories.getStartOffset() + end, headerStories ); }
private Range getSubrangeAt( int plcfHddIndex ) { if ( plcfHdd == null ) return null; GenericPropertyNode prop = plcfHdd.getProperty( plcfHddIndex ); if ( prop.getStart() == prop.getEnd() ) { // Empty story return null; } if ( prop.getEnd() < prop.getStart() ) { // Broken properties? return null; } final int headersLength = headerStories.getEndOffset() - headerStories.getStartOffset(); int start = Math.min( prop.getStart(), headersLength ); int end = Math.min( prop.getEnd(), headersLength ); return new Range( headerStories.getStartOffset() + start, headerStories.getStartOffset() + end, headerStories ); }
@Internal void adjust(int startCp, int shift) { for (GenericPropertyNode node : _props) { if (node.getStart() > startCp) { if (node.getStart() + shift < startCp) { node.setStart(startCp); } else { node.setStart(node.getStart() + shift); } } if (node.getEnd() >= startCp) { if (node.getEnd() + shift < startCp) { node.setEnd(startCp); } else { node.setEnd(node.getEnd() + shift); } } } }
@Internal void adjust( int startCp, int shift ) { for ( GenericPropertyNode node : _props ) { if ( node.getStart() > startCp ) { if ( node.getStart() + shift < startCp ) { node.setStart( startCp ); } else { node.setStart( node.getStart() + shift ); } } if ( node.getEnd() >= startCp ) { if ( node.getEnd() + shift < startCp ) { node.setEnd( startCp ); } else { node.setEnd( node.getEnd() + shift ); } } } }
int endAt = node.getEnd();
int endAt = node.getEnd();
int nodeEndChars = node.getEnd();