Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Nov 8, 2024
1 parent 1fa43f2 commit 4de2afb
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions java/org/jlab/coda/jevio/EvioCompactStructureHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class EvioCompactStructureHandler {
* all of its descendants will switch to that new buffer.
*
* @param node the node to be analyzed.
* @throws EvioException if node arg is null
* @throws EvioException if node arg is null.
*/
public EvioCompactStructureHandler(EvioNode node) throws EvioException {

Expand All @@ -63,7 +63,7 @@ public EvioCompactStructureHandler(EvioNode node) throws EvioException {


/**
* Constructor for reading a buffer that contains 1 structure only (no block headers).
* Constructor for reading a buffer that contains 1 structure only (no record headers).
* The data in the given ByteBuffer object will be copied to a new
* buffer (obtainable by calling {@link #getByteBuffer()}).
*
Expand All @@ -80,7 +80,7 @@ public EvioCompactStructureHandler(ByteBuffer byteBuffer, DataType type) throws


/**
* This method can be used to avoid creating additional EvioCompactEventReader
* This method can be used to avoid creating additional EvioCompactStructureHandler
* objects by reusing this one with another buffer.
*
* @param buf the buffer to be read that contains 1 structure only (no block headers).
Expand All @@ -103,8 +103,7 @@ public synchronized void setBuffer(ByteBuffer buf, DataType type) throws EvioExc
if (buf.remaining() < 1) {
throw new EvioException("buffer has too little data");
}
else if ( (type == DataType.BANK || type == DataType.ALSOBANK) &&
buf.remaining() < 2 ) {
else if (type.isBank() && buf.remaining() < 2 ) {
throw new EvioException("buffer has too little data");
}

Expand Down Expand Up @@ -236,12 +235,11 @@ public EvioNode getStructure() {
}

/**
* Get the EvioNode object associated with a particular event number
* Get the EvioNode object associated with the structure
* which has been scanned so all substructures are contained in the
* node.allNodes list.
* @return EvioNode object associated with a particular event number,
*
* or null if there is none.
* @return EvioNode object associated with the structure,
* or null if there is none.
*/
public EvioNode getScannedStructure() {
EvioNode.scanStructure(node);
Expand Down Expand Up @@ -457,7 +455,7 @@ public synchronized List<EvioNode> searchStructure(int tag, int num)
* (empty if none found)
* @throws EvioException if either dictName or dictionary arg is null;
* if dictName is an invalid dictionary entry;
* if object closed
* if object closed.
*/
public List<EvioNode> searchStructure(String dictName,
EvioXMLDictionary dictionary)
Expand Down Expand Up @@ -506,7 +504,7 @@ public List<EvioNode> searchStructure(String dictName,
* if addBuffer is opposite endian to current event buffer;
* if added data is not the proper length (i.e. multiple of 4 bytes);
* if there is an internal programming error;
* if object closed
* if object closed.
*/
public synchronized ByteBuffer addStructure(ByteBuffer addBuffer) throws EvioException {

Expand Down Expand Up @@ -915,10 +913,10 @@ public synchronized List<EvioNode> getNodes() throws EvioException {

/**
* This method returns an unmodifiable list of all
* evio structures in buffer as EvioNode objects.
* child evio structures in buffer as EvioNode objects.
*
* @throws EvioException if object closed
* @return unmodifiable list of all evio structures in buffer as EvioNode objects.
* @return unmodifiable list of all child evio structures in buffer as EvioNode objects.
*/
public synchronized List<EvioNode> getChildNodes() throws EvioException {
if (closed) {
Expand Down

0 comments on commit 4de2afb

Please sign in to comment.