CADI.Client.Network
Class JPIPResponseFieldsParser

java.lang.Object
  extended by CADI.Client.Network.JPIPResponseFieldsParser

public class JPIPResponseFieldsParser
extends java.lang.Object

Version:
1.0 2007/12/14
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private static java.lang.String[] cnewTransportParamFields
           
private  java.util.Hashtable<java.lang.String,java.lang.String> headers
           
(package private)  HTTPResponse httpResponse
           
private  boolean[] jpipHeaderFieldsFound
           
(package private)  JPIPResponseFields jpipResponseFields
           
private static java.lang.String[] jpipResponseHeaderFields
          ISO/IEC 15444-9 Annex D
 
Constructor Summary
JPIPResponseFieldsParser()
          Constructor.
 
Method Summary
private  void capParser(java.lang.String cap)
           
private  void channelNewParser(java.lang.String cnew)
           
private  void compsParser(java.lang.String comps)
           
private  void contextParser(java.lang.String context)
           
private  void fsizParser(java.lang.String fsiz)
           
 HTTPResponse getHTTPResponse()
          Returns an object which contains the http response field values.
 JPIPResponseFields getJPIPResponseFields()
           
private  void layersParser(java.lang.String layers)
           
private  void lenParser(java.lang.String len)
           
 void list(java.io.PrintStream out)
          Prints this JPIP Response Fields out to the specified output stream.
private  void metareqParser(java.lang.String metareq)
           
private  void msetParser(java.lang.String mset)
           
 void parse(java.util.Hashtable<java.lang.String,java.lang.String> headers)
          Parses the JPIP response fields
protected  void prefParser(java.lang.String pref)
           
private  void qualityParser(java.lang.String quality)
           
private  void requestIDParser(java.lang.String qid)
           
 void reset()
          Sets the class atributes to initial values
private  void roffParser(java.lang.String roff)
           
protected  void roiParser(java.lang.String string)
           
private  void rsizParser(java.lang.String rsiz)
           
private  void srateParser(java.lang.String srate)
           
private  void streamParser(java.lang.String stream)
           
private  void targetIDParser(java.lang.String tid)
           
 java.lang.String toString()
          For debugging purposes.
private  void typeParser(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

httpResponse

HTTPResponse httpResponse

jpipResponseFields

JPIPResponseFields jpipResponseFields

headers

private java.util.Hashtable<java.lang.String,java.lang.String> headers

jpipHeaderFieldsFound

private boolean[] jpipHeaderFieldsFound

jpipResponseHeaderFields

private static java.lang.String[] jpipResponseHeaderFields
ISO/IEC 15444-9 Annex D


cnewTransportParamFields

private static java.lang.String[] cnewTransportParamFields
Constructor Detail

JPIPResponseFieldsParser

public JPIPResponseFieldsParser()
Constructor.

Method Detail

parse

public void parse(java.util.Hashtable<java.lang.String,java.lang.String> headers)
           throws WarningException
Parses the JPIP response fields

Parameters:
headers - definition in headers.
Throws:
WarningException - this exception will be thrown whether a JPIP response parameter is wrong.

reset

public void reset()
Sets the class atributes to initial values


getJPIPResponseFields

public JPIPResponseFields getJPIPResponseFields()
Returns:
returns the jpipResponseFields attribute.

getHTTPResponse

public HTTPResponse getHTTPResponse()
Returns an object which contains the http response field values.

Returns:
returns the httpResponse attribute

toString

public java.lang.String toString()
For debugging purposes.

Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this JPIP Response Fields out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.

targetIDParser

private void targetIDParser(java.lang.String tid)
                     throws WarningException
Parameters:
tid - definition in JPIPResponseFields.tid
Throws:
java.lang.Exception - when the request element is wrong
WarningException

channelNewParser

private void channelNewParser(java.lang.String cnew)
                       throws WarningException
Parameters:
cnew - definition in ChannelField.cnew
Throws:
WarningException - when the request element is wrong

requestIDParser

private void requestIDParser(java.lang.String qid)
                      throws WarningException
Parameters:
qid - defined in JPIPResponseFields.qid
Throws:
WarningException - when the request element is wrong

fsizParser

private void fsizParser(java.lang.String fsiz)
                 throws WarningException
Parameters:
fsiz - defined in JPIPResponseFields.fsiz
Throws:
WarningException - when the request element is wrong

roffParser

private void roffParser(java.lang.String roff)
                 throws WarningException
Parameters:
roff - defined in JPIPResponseFields.roff
Throws:
WarningException - when the request element is wrong

rsizParser

private void rsizParser(java.lang.String rsiz)
                 throws WarningException
Parameters:
rsiz - defined in JPIPResponseFields.rsiz
Throws:
WarningException - when the request element is wrong

compsParser

private void compsParser(java.lang.String comps)
                  throws WarningException
Parameters:
comps - definition in JPIPResponseFields.comps
Throws:
WarningException - when the request element is wrong

streamParser

private void streamParser(java.lang.String stream)
                   throws WarningException
Parameters:
stream - defined in JPIPResponseFields.stream
Throws:
WarningException - when the request element is wrong

contextParser

private void contextParser(java.lang.String context)
                    throws WarningException
Parameters:
context - defined in JPIPResponseFields.context
Throws:
WarningException - when the request element is wrong

roiParser

protected void roiParser(java.lang.String string)

layersParser

private void layersParser(java.lang.String layers)
                   throws WarningException
Parameters:
layers - defined in JPIPResponseFields.layers
Throws:
WarningException - when the request element is wrong

srateParser

private void srateParser(java.lang.String srate)
                  throws WarningException
Parameters:
srate - defined in JPIPResponseFields.srate
Throws:
WarningException

metareqParser

private void metareqParser(java.lang.String metareq)
Parameters:
metareq - defined in JPIPResponseFields.metareq

lenParser

private void lenParser(java.lang.String len)
                throws WarningException
Parameters:
len - defined in JPIPResponseFields.len
Throws:
WarningException - when the request element is wrong

qualityParser

private void qualityParser(java.lang.String quality)
                    throws WarningException
Parameters:
quality - defined in JPIPResponseFields.quality
Throws:
WarningException - when the request element is wrong

typeParser

private void typeParser(java.lang.String type)
                 throws WarningException
Parameters:
type - defined in JPIPResponseFields.type
Throws:
WarningException

msetParser

private void msetParser(java.lang.String mset)
Parameters:
mset - defined in JPIPResponseFields.mset

capParser

private void capParser(java.lang.String cap)
Parameters:
cap - defined in JPIPResponseFields.cap

prefParser

protected void prefParser(java.lang.String pref)
Parameters:
pref - defined in JPIPResponseFields.pref


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)