package w3c.rtsp.common;

import java.io.*;
import java.util.*;
import java.net.*;
import java.awt.*;


public class StatusLine {

  protected String Version=null;
  protected int StatusCode=-1;
  protected int SeqNo=-1;
  protected String ReasonPhrase=null;

  public StatusLine(String Version,int StatusCode,int SeqNo,String ReasonPhrase){
    this.Version=Version;
    this.StatusCode=StatusCode;
    this.SeqNo=SeqNo;
    this.ReasonPhrase=ReasonPhrase;
  }

  //set the version value.

  public void setVersion(String Version){
    this.Version=Version;
  }

  //set the status code value. 

  public void setStatusCode(int StatusCode){
    this.StatusCode=StatusCode;
  }

  //set the SeqNo value.

  public void setSeqNo(int SeqNo){
    this.SeqNo=SeqNo;
  }

  //set the ReasonPhrase value.

  public void setReasonPhrase(String ReasonPhrase){
    this.ReasonPhrase=ReasonPhrase;
  }

  //get the version value.

  public String getVersion(){
    return Version;
  }

  //get the status code value. 

  public int getStatusCode(){
    return StatusCode;
  }

  //get the SeqNo value.

  public int getSeqNo(){
    return SeqNo;
  }

  //get the ReasonPhrase value.

  public String getReasonPhrase(){
    return ReasonPhrase;
  }

  public void emit(PrintWriter output){

    output.print(Version+" ");
    output.print(StatusCode+" ");
    output.print(SeqNo+" ");
    output.print(ReasonPhrase+"\r\n");
  }
}
