Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   *  jDTAUS - DTAUS fileformat.
   *  Copyright (c) 2005 Christian Schulte <cs@schulte.it>
   *
   *  This library is free software; you can redistribute it and/or
   *  modify it under the terms of the GNU Lesser General Public
   *  License as published by the Free Software Foundation; either
   *  version 2.1 of the License, or any later version.
   *
  *  This library 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
  *  Lesser General Public License for more details.
  *
  *  You should have received a copy of the GNU Lesser General Public
  *  License along with this library; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
 package org.jdtaus.core.io.util;
 
 
 {

  
Singleton instance.
 
   private static final CoalescingFileOperationsBundle instance =
     new CoalescingFileOperationsBundle();

  
Creates a new CoalescingFileOperationsBundle instance.
 
   {
     this.getMessage ( "writeBypassesCache", Locale.getDefault() );
     this.getMessage ( "readBypassesCache", Locale.getDefault() );
     this.getMessage ( "alreadyClosed", Locale.getDefault() );
   }

  
Gets the CoalescingFileOperationsBundle singleton.

Returns:
the CoalescingFileOperationsBundle singleton.
 
   {
     return ;
   }

  
Gets the text of the message with key "writeBypassesCache".

Returns:
 A write operation bypassed the cache. Consider increasing the cache. Current block size is {0,number} and current cache size is {1,number}. {2,number} bytes could not be cached.
 
   String getWriteBypassesCacheText ( final Locale locale )
   {
     return this.getMessage ( "writeBypassesCache"locale );
   }

  
Gets the message with key "writeBypassesCache".

Returns:
 A write operation bypassed the cache. Consider increasing the cache. Current block size is {0,number} and current cache size is {1,number}. {2,number} bytes could not be cached.
 
   {
     if ( locale == null )
     {
       locale = Locale.getDefault();
     }
 
     return new MessageFormat ( this.getMessage ( "writeBypassesCache"locale ), locale );
   }
  
Gets the text of the message with key "readBypassesCache".

Returns:
 A read operation bypassed the cache. Consider increasing the cache. Current block size is {0,number} and current cache size is {1,number}. {2,number} bytes could not be cached.
 
   String getReadBypassesCacheText ( final Locale locale )
   {
     return this.getMessage ( "readBypassesCache"locale );
   }

  
Gets the message with key "readBypassesCache".

Returns:
 A read operation bypassed the cache. Consider increasing the cache. Current block size is {0,number} and current cache size is {1,number}. {2,number} bytes could not be cached.
 
   {
     if ( locale == null )
     {
       locale = Locale.getDefault();
     }
    return new MessageFormat ( this.getMessage ( "readBypassesCache"locale ), locale );
  }
  
Gets the text of the message with key "alreadyClosed".

Returns:
 Instance is closed - cannot perform I/O.
  String getAlreadyClosedText ( final Locale locale )
  {
    return this.getMessage ( "alreadyClosed"locale );
  }

  
Gets the message with key "alreadyClosed".

Returns:
 Instance is closed - cannot perform I/O.
  {
    if ( locale == null )
    {
      locale = Locale.getDefault();
    }
    return new MessageFormat ( this.getMessage ( "alreadyClosed"locale ), locale );
  }

  
Gets a message for a given key and locale.

Parameters:
key the key of the message to return.
locale the locale of the message.
Returns:
message for key using locale.
  private String getMessagefinal String keyLocale locale )
  {
    if ( locale == null )
    {
      locale = Locale.getDefault();
    }
    return ResourceBundle.getBundle"org/jdtaus/core/io/util/CoalescingFileOperations",
                                     locale ).getStringkey );
  }
New to GrepCode? Check out our FAQ X