litesoft
@ 939
litesoft / trunk / Java / core / Server / src / org / litesoft / textfiledirectory / AbstractTextFileDirectory.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
package org.litesoft.textfiledirectory; import org.litesoft.commonfoundation.typeutils.*; public abstract class AbstractTextFileDirectory implements TextFileDirectory { protected String[] preprocessExtensions( String[] pExtensions ) { String[] zExtensions = Objects.deNull( pExtensions, Strings.EMPTY_ARRAY ); for ( int i = 0; i < zExtensions.length; i++ ) { zExtensions[i] = "." + Strings.assertNotNullNotEmpty( "Extension[" + i + "]", zExtensions[i] ); } return zExtensions; } protected void assertExists( boolean pExists, String pFileName ) { if ( !pExists ) { throw new FileDoesNotExists( "No File or Not a File: " + getDirectoryPath() + "/" + pFileName ); } } protected void assertNotExists( boolean pExists, String pFileName ) { if ( pExists ) { throw new FileAlreadyExists( "Already an existing File: " + getDirectoryPath() + "/" + pFileName ); } } } |
Commits for litesoft/trunk/Java/core/Server/src/org/litesoft/textfiledirectory/AbstractTextFileDirectory.java
Revision | Author | Commited | Message |
---|---|---|---|
939 Diff | GeorgeS | Mon 02 Jun, 2014 21:30:31 +0000 | Extracting commonfoundation |
836 Diff | GeorgeS | Wed 05 Sep, 2012 15:01:18 +0000 | |
821 Diff | GeorgeS | Sun 19 Aug, 2012 00:08:41 +0000 | |
804 Diff | GeorgeS | Wed 15 Aug, 2012 12:48:51 +0000 | |
800 Diff | GeorgeS | Wed 15 Aug, 2012 03:33:38 +0000 | |
791 | GeorgeS | Sun 12 Aug, 2012 15:22:58 +0000 | ! |