com.sage.accpac.sm
Class StringTooLongException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sage.accpac.sm.StringTooLongException
- All Implemented Interfaces:
- java.io.Serializable
public class StringTooLongException
- extends java.lang.RuntimeException
The StringTooLongException
class provides an unchecked exception
that is thrown when a string is too long to fit into an Accpac field or
similar.
Accpac is very heavily based upon fixed size buffers and so this exception is
thrown when a String is offered that is too long for a fixed space.
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getPermitted()
returns the portion of the string that would fit. |
java.lang.String |
getString()
returns the string that did not fit |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StringTooLongException
public StringTooLongException(java.lang.String string,
int permitted)
- Parameters:
string
- the string that was being processedpermitted
- the number of characters of the string that were processed
getString
public java.lang.String getString()
- returns the string that did not fit
- Returns:
- the string that was being processed and did not fit (or null)
getPermitted
public java.lang.String getPermitted()
- returns the portion of the string that would fit.
Note that the length of the string that fits is not fixed. One
30-character string may fit while a different one does not fit. That is
why this returns the portion that fits rather than specifying the length
permitted.
- Returns:
- the portion of the string that would fit.
- Throws:
java.lang.NullPointerException
- if getString()
returns null.
Copyright © 2010 Sage Software, Inc. All rights reserved.