public class MainHeaderDataBin extends DataBin
Modifier and Type | Field and Description |
---|---|
protected DataBinStream |
dataStream
Object containing the stream of data.
|
classIdentifier, complete
EXTENDED_PRECINCT, EXTENDED_TILE, MAIN_HEADER, METADATA, PRECINCT, TILE, TILE_HEADER
Constructor and Description |
---|
MainHeaderDataBin()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStream(byte[] data,
long offset,
boolean complete)
Adds a data-bin message to the cache.
|
long |
available() |
byte[] |
getDataArray() |
long |
getLength()
Returns the length of the stored data.
|
long |
getNumBytesLeft() |
long |
getPos() |
void |
list(java.io.PrintStream out)
Prints this DataBin out to the specified output stream.
|
byte |
readByte() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
void |
reset()
Set attributes to its initial values.
|
void |
seek(long offset) |
int |
skipBytes(int n) |
java.lang.String |
toString() |
getClassIdentifier, isComplete, isHeldByCurrentThread, isLocked, lock, unlock
protected DataBinStream dataStream
public void addStream(byte[] data, long offset, boolean complete)
This method can only be used when there were no gaps between consecutive message data. Otherwise, and exception is thrown.
data
- definition in JPIPMessage.messageBody
offset
- definition in JPIPMessageHeader.msgOffsetcomplete
- definition in JPIPMessageHeader.isLastBytepublic long getLength()
public byte[] getDataArray()
public void seek(long offset)
offset
- public int skipBytes(int n)
n
- public long getPos()
public long getNumBytesLeft()
public long available()
public byte readByte() throws java.io.EOFException
java.io.EOFException
public void readFully(byte[] b)
b
- public void readFully(byte[] b, int off, int len) throws java.io.EOFException
b
- off
- len
- java.io.EOFException
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)