summaryrefslogtreecommitdiff
path: root/odk/examples/java/Storage/TestHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/Storage/TestHelper.java')
-rw-r--r--odk/examples/java/Storage/TestHelper.java36
1 files changed, 18 insertions, 18 deletions
diff --git a/odk/examples/java/Storage/TestHelper.java b/odk/examples/java/Storage/TestHelper.java
index f5b487bc5730..2868de481f81 100644
--- a/odk/examples/java/Storage/TestHelper.java
+++ b/odk/examples/java/Storage/TestHelper.java
@@ -32,7 +32,7 @@ public class TestHelper {
Error( "Can't get XOutputStream implementation from substream '" + sStreamName + "'!" );
return false;
}
-
+
// get XTrucate implementation from output stream
XTruncate xTruncate = (XTruncate) UnoRuntime.queryInterface( XTruncate.class, xOutput );
if ( xTruncate == null )
@@ -40,7 +40,7 @@ public class TestHelper {
Error( "Can't get XTruncate implementation from substream '" + sStreamName + "'!" );
return false;
}
-
+
// write requested byte sequence
try
{
@@ -125,7 +125,7 @@ public class TestHelper {
Error( "Can't create substream '" + sStreamName + "', exception : " + e + "!" );
return false;
}
-
+
return WriteBytesToStream( xSubStream, sStreamName, sMediaType, bCompressed, pBytes );
}
@@ -237,7 +237,7 @@ public class TestHelper {
Message( "Optional interface XEncryptionProtectedSource is not implemented, feature can not be tested!" );
return -1;
}
-
+
try {
xStreamEncryption.setEncryptionKey( pNewPass );
}
@@ -282,7 +282,7 @@ public class TestHelper {
Error( "'IsRoot' property contains wrong value!" );
bOk = false;
}
-
+
if ( ( bIsRoot && ( nPropMode | ElementModes.ELEMENT_READ ) != ( nMode | ElementModes.ELEMENT_READ ) )
|| ( !bIsRoot && ( nPropMode & nMode ) != nMode ) )
{
@@ -325,13 +325,13 @@ public class TestHelper {
+ sMediaType + "', set '" + sPropMediaType + "' !" );
bOk = false;
}
-
+
if ( bPropIsRoot != bIsRoot )
{
Error( "'IsRoot' property contains wrong value!" );
bOk = false;
}
-
+
if ( ( bIsRoot && ( nPropMode | ElementModes.ELEMENT_READ ) != ( nMode | ElementModes.ELEMENT_READ ) )
|| ( !bIsRoot && ( nPropMode & nMode ) != nMode ) )
{
@@ -364,7 +364,7 @@ public class TestHelper {
Error( "Can't get XInputStream implementation from substream '" + sName + "'!" );
return false;
}
-
+
byte pContents[][] = new byte[1][]; // ???
// read contents
@@ -418,11 +418,11 @@ public class TestHelper {
bOk = true;
if ( !sPropMediaType.equals( sMediaType ) )
{
- Error( "'MediaType' property contains wrong value for stream '" + sName + "',\nexpected: '"
+ Error( "'MediaType' property contains wrong value for stream '" + sName + "',\nexpected: '"
+ sMediaType + "', set: '" + sPropMediaType + "'!" );
bOk = false;
}
-
+
if ( nPropSize != pBytes.length )
{
Error( "'Size' property contains wrong value for stream'" + sName + "'!" );
@@ -464,7 +464,7 @@ public class TestHelper {
Error( "Can't open substream '" + sName + "', exception : " + e + "!" );
return false;
}
-
+
return InternalCheckStream( xSubStream, sName, sMediaType, pBytes );
}
@@ -475,7 +475,7 @@ public class TestHelper {
byte[] pPass )
{
// Important: a common password for any of parent storage should not be set or
- // should be different from pPass
+ // should be different from pPass
if ( pPass.length == 0 )
{
@@ -496,7 +496,7 @@ public class TestHelper {
Error( "Unexpected exception in case of opening of encrypted stream '" + sName + "' without password: " + e + "!" );
return false;
}
-
+
byte pWrongPass[] = { 1, 1 };
pWrongPass[0] += pPass[0];
try
@@ -512,7 +512,7 @@ public class TestHelper {
Error( "Unexpected exception in case of opening of encrypted stream '" + sName + "' with wrong password: " + e + "!" );
return false;
}
-
+
XStream xSubStream = null;
try
{
@@ -529,7 +529,7 @@ public class TestHelper {
Error( "Can't open encrypted substream '" + sName + "', exception : " + e + "!" );
return false;
}
-
+
return InternalCheckStream( xSubStream, sName, sMediaType, pBytes );
}
@@ -571,7 +571,7 @@ public class TestHelper {
return true;
}
-
+
public boolean disposeStorage( XStorage xStorage )
{
// dispose the storage
@@ -639,7 +639,7 @@ public class TestHelper {
Error( "Can't close output part of a stream, exception :" + e );
return false;
}
-
+
return true;
}
@@ -681,7 +681,7 @@ public class TestHelper {
public String CreateTempFile( XMultiServiceFactory xMSF )
{
String sResult = null;
-
+
// try to get temporary file representation
XPropertySet xTempFileProps = null;
try