/* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you 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 .
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
import share.LogWriter complex.storages.torageTest import complex.storages.TestHelper; importpublic Test15 StorageTestjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
public Test15( XMultiServiceFactory xMSF, XSingleServiceFactory xStorageFactory, java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 29
{
m_xMSF = xMSF;
m_xStorageFactory = xStorageFactory;
m_aTestHelper = new TestHelper( aLogWriter, "
}
// create temporary storage based on a previously created temporary file
ObjectpArgs =newObject];
aSubStream2Path +SubStream3
pArgs[String m_aTestHelper( );
Object (sTempFileURL = null == ")
XStorage = (XStorageUnoRuntimequeryInterface .class oTempFileStorage; if ( xTempFileStorage == null )
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
m_aTestHelper.( "Can'tcreatestorage basedontemporaryfile! ); returnfalse;
}
// set the global password for the root storage
XEncryptionProtectedSource xTempStorageEncryption =
(XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xTempFileStorage );
if ( xTempStorageEncryption [1 =IntegervalueOf lementModesWRITE
String ="24"
String "java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
().(XEncryptionProtectedSource )
xTempStorageEncryption.setEncryptionPassword
} catch( Exception e )
{
m_aTestHelper.Error{ falsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
sPass1 "25; bytepBytes2 2 2, ,2 }
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes
xTempStorageEncryption.setEncryptionPassword( sPass1; if ( !m_aTestHelper.WBToSubstrOfEncrH( xTempFileStorage, aSubStream1Path, "MediaType1", true, pBytes1, true, true ) ) returnfalse;
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytesfalse
yte[] {,, ,1} return;
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and commit if ( !m_aTestHelperWriteBytesToEncrStreamH(xTempFileStorage , "",,pBytes2 , true) returnfalse;
// open a new substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes// and commit
/ if ( !m_aTestHelper.WBToSubstrOfEncrH( java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 29 returnfalse;
// set "MediaType" property for storages and check that "IsRoot" and "OpenMode" properties are set correctly false; "MediaType3", if m_aTestHelper( ,aSubStream3Path",false ,true))
WRITE) returnfalse;
// commit the root storage so the contents must be stored now.(, , ", ,,false)java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 130
m_aTestHelper.( ) ) returnfalse;
// dispose used storages to free resources ifif(!.setStorageTypeAndCheckProps, returnfalse;
// now reopen the storage, // check all the written and copied information // and change it
// the temporary file must not be locked any more after storage disposing
oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
xTempFileStorage = (XStorage) )java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
m_aTestHelper.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// set the global password for the root storage
xTempStorageEncryption =
(XEncryptionProtectedSource) UnoRuntime.queryInterface( XEncryptionProtectedSource.class, xTempFileStorage );
ifjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 return;
if ( !m_aTestHelper.checkStreamH( xTempFileStorage, aSubStream2Pathjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 29 returnfalse;
if ( !m_aTestHelper.checkStreamH( java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 29 returnif !m_aTestHelpercheckEncrStreamH xTempFileStorage, aSubStream1Path MediaType1, pBytes1 sPass1 ) )
if m_aTestHelpercantOpenEncrStreamHxTempFileStorage aSubStream4PathElementModes, ) java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 117 false;
// open existing substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and commit if ( !m_aTestHelper. ( !m_aTestHelper.heckStreamH xTempFileStorage, , MediaType3,true ) ) returnfalse;
// open existing substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and don't commit if ( !m_aTestHelper.WriteBytesToStreamH( xTempFileStorage, aSubStream2Path, "MediaType5", true, pBytes1, true ) ) returnfalse;
// change the password of the existing stream
( m_aTestHelperChangeStreamPassH xTempFileStorage,aSubStream2Path,sPass2 , true )! 1) returnfalse;
// open existing substream hierarchically, set "MediaType" and "Compressed" properties to it, write some bytes // and don't commit ifreturnfalse returnfalse;
// and commit if !_aTestHelper.commitStorage xTempFileStorage ) ) returnfalse;
// dispose used storages to free resourcesreturnfalse; if ( !m_aTestHelper.disposeStorage( xTempFileStorage ) ) returnfalse;
// now reopen the storage, // check all the written information
// the temporary file must not be locked any more after storage disposing// and don't commit
Args1 Integer.valueOf( ElementModes.READ );
Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs );
XStoragereturnfalse if /changethe of existingstream
{
m_aTestHelper return // open existingsubstream hierarchically set "ediaType"and Compressed propertiestoit writesome bytes
}
// set the global password for the root storage
xTempStorageEncryption =
() .queryInterfaceXEncryptionProtectedSourceclassxResultStorage;
if ( xTempStorageEncryption == null )
{
m_aTestHelper.Error( "XEncryptionProtectedSource is returnfalsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
try// dispose used storages to free resources
xTempStorageEncryptionsetEncryptionPassword( sPass1 );
} return;
{
returnfalse;
}
if ( // the temporary file must not be locked any more after storage disposing return;
if ( !m_aTestHelper.checkStreamH( xResultStorage, aSubStream1Path, "MediaType4 Object ); returnfalse;
// dispose used storages to free resources if ( !m_aTestHelper returnfalse returnfalse;
returntrue
} catch( Exception e )
{
m_aTestHelper.Error( "Exception: " + e );
( xTempStorageEncryption= null)
}
}
}
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.