Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   *  Copyright 2001-2005 Stephen Colebourne
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  *  Unless required by applicable law or agreed to in writing, software
  *  distributed under the License is distributed on an "AS IS" BASIS,
  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
 package org.joda.time.format;
 
 import java.io.Writer;
 
Internal interface for creating textual representations of datetimes.

Application users will rarely use this class directly. Instead, you will use one of the factory classes to create a DateTimeFormatter.

The factory classes are:
- DateTimeFormatterBuilder
- DateTimeFormat
- ISODateTimeFormat

Author(s):
Brian S O'Neill
Stephen Colebourne
Since:
1.0
See also:
DateTimeFormatterBuilder
DateTimeFormat
ISODateTimeFormat
 
 public interface DateTimePrinter {

    
Returns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.

Returns:
the estimated length
 
     int estimatePrintedLength();
 
     //-----------------------------------------------------------------------
     
Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.

Parameters:
buf formatted instant is appended to this buffer, not null
instant millis since 1970-01-01T00:00:00Z
chrono the chronology to use, not null
displayOffset if a time zone offset is printed, force it to use this millisecond value
displayZone the time zone to use, null means local time
locale the locale to use, null means default locale
 
     void printTo(StringBuffer buflong instantChronology chrono,
                  int displayOffsetDateTimeZone displayZoneLocale locale);

    
Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.

Parameters:
out formatted instant is written out
instant millis since 1970-01-01T00:00:00Z
chrono the chronology to use, not null
displayOffset if a time zone offset is printed, force it to use this millisecond value
displayZone the time zone to use, null means local time
locale the locale to use, null means default locale
 
     void printTo(Writer outlong instantChronology chrono,
                  int displayOffsetDateTimeZone displayZoneLocale localethrows IOException;
 
     //-----------------------------------------------------------------------
     
Prints a ReadablePartial.

Parameters:
buf formatted partial is appended to this buffer, not null
partial partial to format, not null
locale the locale to use, null means default locale
 
     void printTo(StringBuffer bufReadablePartial partialLocale locale);

    
Prints a ReadablePartial.

Parameters:
out formatted partial is written out, not null
partial partial to format, not null
locale the locale to use, null means default locale
    void printTo(Writer outReadablePartial partialLocale localethrows IOException;
New to GrepCode? Check out our FAQ X