Commit 9efa9a63 authored by Kevin Kershaw's avatar Kevin Kershaw

Initial commit of ocap_ri trunk

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0"?>
<!--
##############################################################################
#
# This buildfile builds the CyberGarage UPnP stack.
#
# @author Keith Mastranunzio - keith@flec.tv
#
##############################################################################
-->
<project name="cybergarage" default="build" basedir=".">
<property name="version" value="1.0"/>
<property name="javac.DEBUG" value="yes"/>
<property name="javac.OPTIMIZE" value="no"/>
<property name="javac.DEPRECATION" value="yes"/>
<property name="javac.TARGET" value="1.1"/>
<property name="jar.COMPRESS" value="no"/>
<property name="bindir.bin" value="${basedir}/bin"/>
<property name="bindir.classes" value="${bindir.bin}/classes"/>
<!-- Pull in target configuration properties -->
<property environment="env"/>
<property file="${env.OCAPROOT}/target/${env.OCAPTC}/buildrules.properties" />
<property file="${env.OCAPROOT}/tools/${env.OCAPHOST}/hostrules.properties" />
<property file="${env.OCAPROOT}/${build.java.PROPERTYFILE}" />
<property file="${env.OCAPROOT}/java/javadoc.properties" />
<target name="build"
description="Builds CyberGarage"
depends="init, build.java"/>
<target name="build.java"
description="Builds CyberGarage"
depends="init, mkdir, jar.java"/>
<target name="jar.java" depends="javac.java">
<jar destfile="${bindir.bin}/cybergarage${DATE}.jar"
compress="${jar.COMPRESS}">
<fileset dir="${bindir.classes}" includes="**/*.class" />
</jar>
</target>
<target name="javac.java">
<javac srcdir="${basedir}/src/java"
destdir="${bindir.classes}"
includes="**/*.java"
debug="${javac.DEBUG}"
optimize="${javac.OPTIMIZE}"
deprecation="${javac.DEPRECATION}"
target="${javac.TARGET}"
includeAntRuntime="no">
<classpath>
<filelist dir="${env.OCAPROOT}" files="${build.lib.CLASSPATH}"/>
</classpath>
<bootclasspath>
<filelist dir="${env.OCAPROOT}" files="${build.lib.BOOTCLASSPATH}" />
</bootclasspath>
</javac>
</target>
<target name="mkdir">
<mkdir dir="${bindir.bin}"/>
<mkdir dir="${bindir.classes}"/>
</target>
<target name="init">
<tstamp>
<format property="DATE" pattern="MMMMdyyyy"/>
</tstamp>
</target>
<target name="clean"
description="Cleans up intermediate files">
<delete dir="${bindir.classes}" quiet="true" />
</target>
<target name="purge"
description="Deletes generated binary files">
<delete dir="${bindir.classes}" quiet="true" />
<delete file="${bindir.bin}/*.jar" quiet="true" />
</target>
</project>
/******************************************************************
*
* CyberHTTP for Java
*
* Copyright (C) Satoshi Konno 2002-2003
*
* File : Date.java
*
* Revision;
*
* 01/05/03
* - first revision
* 10/20/04
* - Theo Beisch <theo.beisch@gmx.de>
* - Fixed the following methods to use HOUR_OF_DAY instead of HOUR.
* getHour(), getDateString() getTimeString()
* - Fixed getInstance() to return GMT instance.
*
******************************************************************/
package org.cybergarage.http;
import java.util.Calendar;
import java.util.TimeZone;
public class Date
{
private Calendar cal;
public Date(Calendar cal)
{
this.cal = cal;
}
public Calendar getCalendar()
{
return cal;
}
////////////////////////////////////////////////
// Time
////////////////////////////////////////////////
public int getHour()
{
// Thanks for Theo Beisch (10/20/04)
return getCalendar().get(Calendar.HOUR_OF_DAY);
}
public int getMinute()
{
return getCalendar().get(Calendar.MINUTE);
}
public int getSecond()
{
return getCalendar().get(Calendar.SECOND);
}