CodePageString codePageString = new CodePageString(); codePageString.setJavaValue( (String)value, codepage ); length = codePageString.write( out );
return cpString.getJavaValue( codepage );
CodePageString cps = new CodePageString(); cps.read(lei); _value = cps; break;
CodePageString codePageString = new CodePageString( (String) value, codepage ); length += codePageString.write( out ); break;
_value = new CodePageString( data, offset ); return ( (CodePageString) _value ).getSize(); _value = new CodePageString( data, offset ); return ( (CodePageString) _value ).getSize();
CodePageString( String string, int codepage ) throws UnsupportedEncodingException { setJavaValue( string, codepage ); }
IndirectPropertyName( byte[] data, int offset ) { _value = new CodePageString( data, offset ); }
void setJavaValue( String string, int codepage ) throws UnsupportedEncodingException { if ( codepage == -1 ) _value = ( string + "\0" ).getBytes(); else _value = ( string + "\0" ) .getBytes( codepageToEncoding( codepage ) ); }
int getSize() { return _value.getSize(); } }
CodePageString codePageString = new CodePageString( (String) value, codepage ); length += codePageString.write( out ); break;
_value = new CodePageString( data, offset ); return ( (CodePageString) _value ).getSize(); _value = new CodePageString( data, offset ); return ( (CodePageString) _value ).getSize();
CodePageString( String string, int codepage ) throws UnsupportedEncodingException { setJavaValue( string, codepage ); }
IndirectPropertyName( byte[] data, int offset ) { _value = new CodePageString( data, offset ); }
void setJavaValue( String string, int codepage ) throws UnsupportedEncodingException { if ( codepage == -1 ) _value = ( string + "\0" ).getBytes(); else _value = ( string + "\0" ) .getBytes( codepageToEncoding( codepage ) ); }
int getSize() { return _value.getSize(); } }
CodePageString codePageString = new CodePageString(); codePageString.setJavaValue( (String)value, codepage ); length = codePageString.write( out );
CodePageString cps = new CodePageString(); cps.read(lei); _value = cps; break;
return string.getJavaValue( codepage );
String getJavaValue( int codepage ) throws UnsupportedEncodingException { String result; if ( codepage == -1 ) result = new String( _value ); else result = new String( _value, codepageToEncoding( codepage ) ); final int terminator = result.indexOf( '\0' ); if ( terminator == -1 ) { logger.log( POILogger.WARN, "String terminator (\\0) for CodePageString property value not found." + "Continue without trimming and hope for the best." ); return result; } if ( terminator != result.length() - 1 ) { logger.log( POILogger.WARN, "String terminator (\\0) for CodePageString property value occured before the end of string. " + "Trimming and hope for the best." ); } return result.substring( 0, terminator ); }
return string.getJavaValue( codepage );