public class JPIPMessageHeader extends java.lang.Object implements ClassIdentifiers
Further information, see ISO/IEC 15444-9 section A.2
Modifier and Type | Field and Description |
---|---|
int |
Aux
If present, it represents a non-negative integer value, formed by
concatenating the leas significant 7 bits of each byte in the VBAS in
big-endian order.
|
int |
classIdentifier
If present, provides a message class identifier.
|
int |
CSn
If present, identifies the index (stating from 0) of the codestream to
which the data-bin belongs.
|
int |
EORCode
Definition in
EORCodes . |
java.lang.String |
EORReasonMessage
It is and reason message associated with the
EORReasonCode . |
long |
inClassIdentifier |
boolean |
isEOR
Indicates if this JPIP Message is an End of Response Message.
|
boolean |
isLastByte
Bin-ID = [BinIdIndicator, completeDataBin, InClassIdentifier]
Bin-ID format:
MSB LSB 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 ----------------- ----------------- ----------------- |a|b b|c|d d d d| |a|d d d d d d d| |a|d d d d d d d| ..... ----------------- ----------------- ----------------- Bits 6 and 5 of the first, BinIDIndicator, byte indicate whether the Class and CSn VBASs are present in the message header. |
long |
msgLength
Identifies the total number of bytes in the body of the message.
|
long |
msgOffset
Identifies the offset of the data in the message from the start of the
data-bin.
|
EXTENDED_PRECINCT, EXTENDED_TILE, MAIN_HEADER, METADATA, PRECINCT, TILE, TILE_HEADER
Constructor and Description |
---|
JPIPMessageHeader()
Default constructor.
|
JPIPMessageHeader(int EORCode,
int MsgLength)
Constructor for EOR message header.
|
JPIPMessageHeader(int CSn,
int classIdentifier,
long inClassIdentifier,
long msgOffset,
long msgLength,
boolean isLastByte,
int Aux)
Constructor.
|
JPIPMessageHeader(int EORCode,
java.lang.String EORReasonMessage)
Constructor for EOR message header.
|
JPIPMessageHeader(JPIPMessageHeader jpipMessageHeader)
Constructor.
|
public boolean isLastByte
Bits 6 and 5 of the first, BinIDIndicator, byte indicate whether the Class and CSn VBASs are present in the message header. Next table defines the bit values and its meaning
Indicator | Meaning |
0 | Prohibited |
1 | No Class or CSn VBAS is present in message header |
2 | Class VBAS is present but CSn is no present in message header |
3 | Class and CSn VBAS are both present in the message header |
Bit 4, completeDataBin, of the first byte of the Bin-ID indicates whether or not this message contains the last byte in the asociated data-bin: '0' means it is not the last byte in the data-bin; '1' inidates tat it is the last byte in the data-bin.
The remaining 4 bits of the first byte and the 7 low order bits of any remaining bytes in the Bin-ID VBAS form an "in-class identifier".
public long inClassIdentifier
public int classIdentifier
Class identifier | Message class | Data-bin class | Stream type |
0 | Precinct data-bin message | Precinct data-bin | JPP-stream only |
1 | Extended precinct data-bin message | Precinct data-bin | JPP-stream only |
2 | Tile header data-bin message | Tile header data-bin | JPP-stream only |
4 | Tile data-bin message | Tile data-bin | JPT-stream only |
5 | Extended precinct data-bin message | Tile data-bin | JPT-stream only |
6 | Main header data-bin message | Main heaer data-bin | JPP- and JPT-stream |
8 | Metadata-bin message | Metadata-bin | JPP and JPT-stream |
Allowed values, see ClassIdentifiers
.
public int CSn
public long msgOffset
public long msgLength
public int Aux
Its presence and meaning if present, is determined by the message class identifier foun within the Bin-ID VBAS.
public boolean isEOR
public int EORCode
EORCodes
.
Further information, see ISO/IEC 15444-9 sect. D.3
public java.lang.String EORReasonMessage
EORReasonCode
.
It is an optional attribute.
public JPIPMessageHeader()
public JPIPMessageHeader(int CSn, int classIdentifier, long inClassIdentifier, long msgOffset, long msgLength, boolean isLastByte, int Aux)
CSn
- definition in CSn
classIdentifier
- definition in classIdentifier
inClassIdentifier
- definition in inClassIdentifier
msgOffset
- definition in msgOffset
msgLength
- definition in msgLength
isLastByte
- definition in isLastByte
Aux
- definition in Aux
public JPIPMessageHeader(JPIPMessageHeader jpipMessageHeader)
jpipMessageHeader
- an object of this classpublic JPIPMessageHeader(int EORCode, int MsgLength)
EORCode
- MsgLength
- public JPIPMessageHeader(int EORCode, java.lang.String EORReasonMessage)
EORCode
- EORReasonMessage
- public void reset()
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)