org.eclipse.mofscript.runtime
Class BlockOutputStream.FileBlock

java.lang.Object
  extended by org.eclipse.mofscript.runtime.BlockOutputStream.FileBlock
Direct Known Subclasses:
BlockOutputStream.ProtectedFileBlock, BlockOutputStream.UnprotectedFileBlock
Enclosing class:
BlockOutputStream

public class BlockOutputStream.FileBlock
extends java.lang.Object

Author:
jol

Field Summary
protected  int _blockEnd
           
protected  int _blockStart
           
protected  java.io.ByteArrayOutputStream _byteStream
           
protected  int _endLine
           
protected  java.lang.String _id
           
protected  int _idBlockCount
           
protected  int _lineCount
           
protected  int _mergeDiff
           
protected  BlockOutputStream.FileBlock _nextBlock
           
protected  int _startLine
           
 
Constructor Summary
BlockOutputStream.FileBlock(java.lang.String id)
          Root block
 
Method Summary
 void append(BlockOutputStream.FileBlock otherBlock)
          Appends otherblock to this block
 int get_endLine()
           
 int get_startLine()
           
 int getBlockStart()
           
protected  BlockOutputStream.FileBlock getBlockWithId(java.lang.String id)
           
protected  byte[] getData()
           
 int getLineCount()
           
 int getMergeDiff()
           
 void merge(BlockOutputStream.FileBlock otherBlock)
           
 void newBlock(boolean isProtected, java.lang.String id)
           
 int position()
           
protected  void putData(byte[] data)
           
 void set_endLine(int line)
           
 void set_startLine(int line)
           
protected  void setBlockStart(int position)
           
 void setLineCount(int count)
           
 void write(byte[] data)
           
 void write(int b)
           
protected  void writeToFileStream(java.io.FileOutputStream fs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_nextBlock

protected BlockOutputStream.FileBlock _nextBlock

_id

protected java.lang.String _id

_byteStream

protected java.io.ByteArrayOutputStream _byteStream

_blockStart

protected int _blockStart

_blockEnd

protected int _blockEnd

_mergeDiff

protected int _mergeDiff

_startLine

protected int _startLine

_endLine

protected int _endLine

_lineCount

protected int _lineCount

_idBlockCount

protected int _idBlockCount
Constructor Detail

BlockOutputStream.FileBlock

public BlockOutputStream.FileBlock(java.lang.String id)
Root block

Parameters:
id -
Method Detail

position

public int position()
Returns:

getMergeDiff

public int getMergeDiff()

getLineCount

public int getLineCount()

setLineCount

public void setLineCount(int count)

putData

protected void putData(byte[] data)

getData

protected byte[] getData()
Returns:

setBlockStart

protected void setBlockStart(int position)
Parameters:
position -

getBlockStart

public int getBlockStart()
Returns:

write

public void write(int b)
Parameters:
b -

write

public void write(byte[] data)
Parameters:
data -

writeToFileStream

protected void writeToFileStream(java.io.FileOutputStream fs)

newBlock

public void newBlock(boolean isProtected,
                     java.lang.String id)
Parameters:
isProtected -
id -

getBlockWithId

protected BlockOutputStream.FileBlock getBlockWithId(java.lang.String id)
Parameters:
id -
Returns:

merge

public void merge(BlockOutputStream.FileBlock otherBlock)
Parameters:
otherBlock -

append

public void append(BlockOutputStream.FileBlock otherBlock)
Appends otherblock to this block

Parameters:
otherBlock -

get_endLine

public int get_endLine()

set_endLine

public void set_endLine(int line)

get_startLine

public int get_startLine()

set_startLine

public void set_startLine(int line)