├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ ├── Apache_Commons_Net_originated_source_copyright.xml │ ├── Apache_Harmony_originated_source_copyright.xml │ ├── BlowfishJ_originated_source_copyright.xml │ ├── Default_copyright.xml │ ├── JUnit_originated_source_copyright.xml │ ├── Joda_Time_originated_source_copyright.xml │ ├── Logback_originated_source_copyright.xml │ ├── SLF4J_originated_source_copyright.xml │ ├── Scribe_originated_source_copyright.xml │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── libraries │ ├── Gradle__com_intellij_annotations_9_0_4.xml │ ├── Gradle__junit_junit_4_10.xml │ └── Gradle__org_hamcrest_hamcrest_core_1_1.xml ├── misc.xml ├── modules.xml ├── scopes │ ├── Apache_Commons_Net_originated_source.xml │ ├── Apache_Harmony_originated_source.xml │ ├── BlowfishJ_originated_source.xml │ ├── JUnit_originated_source.xml │ ├── Joda_Time_originated_source.xml │ ├── Logback_originated_source.xml │ ├── SLFJ_originated_source.xml │ ├── Scribe_originated_source.xml │ └── scope_settings.xml ├── uiDesigner.xml └── vcs.xml ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.m2e.core.prefs ├── LICENSE ├── NOTICE ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jsimple.iml ├── libraries ├── build.gradle ├── c# │ ├── jsimple.sln │ └── packages │ │ ├── NUnit.2.6.2 │ │ ├── NUnit.2.6.2.nupkg │ │ ├── NUnit.2.6.2.nuspec │ │ ├── lib │ │ │ ├── nunit.framework.dll │ │ │ └── nunit.framework.xml │ │ └── license.txt │ │ └── repositories.config ├── jsimple-io │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c#-test │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io-test.csproj │ │ ├── jsimple-io-test.csproj.DotSettings │ │ └── packages.config │ ├── c#-windows-desktop │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io-windows-desktop.csproj │ │ ├── jsimple-io-windows-desktop.csproj.DotSettings │ │ ├── nontranslated │ │ │ └── jsimple │ │ │ │ ├── io │ │ │ │ ├── FileSystemDirectory.cs │ │ │ │ ├── FileSystemFile.cs │ │ │ │ ├── JSimpleIO.cs │ │ │ │ └── WindowsDesktopPaths.cs │ │ │ │ └── net │ │ │ │ ├── DotNetTcpIpSocketListener.cs │ │ │ │ ├── TcpClientSocket.cs │ │ │ │ ├── WindowsDesktopHttpRequest.cs │ │ │ │ └── WindowsDesktopHttpResponse.cs │ │ └── packages.config │ ├── c#-windows-phone │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io-windows-phone.csproj │ │ ├── jsimple-io-windows-phone.csproj.DotSettings │ │ └── nontranslated │ │ │ └── jsimple │ │ │ ├── io │ │ │ ├── AsyncOperationExtension.cs │ │ │ ├── JSimpleIO.cs │ │ │ ├── OperationComplete.cs │ │ │ ├── StorageFileFile.cs │ │ │ ├── StorageFolderDirectory.cs │ │ │ ├── StorageItemPathAttributes.cs │ │ │ └── WindowsPhonePaths.cs │ │ │ ├── net │ │ │ ├── WindowsPhoneHttpRequest.cs │ │ │ └── WindowsPhoneHttpResponse.cs │ │ │ └── net2 │ │ │ ├── JSimpleNet.cs │ │ │ ├── WindowsPhoneHttpRequest.cs │ │ │ └── WindowsPhoneHttpResponse.cs │ ├── c#-windows-store │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io-windows-store.csproj │ │ └── jsimple-io-windows-store.csproj.DotSettings │ ├── c#-windows-universal │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io-windows-universal.csproj │ │ └── nontranslated │ │ │ └── jsimple │ │ │ ├── io │ │ │ ├── AsyncOperationExtension.cs │ │ │ ├── JSimpleIO.cs │ │ │ ├── StorageFileFile.cs │ │ │ ├── StorageFolderDirectory.cs │ │ │ ├── StorageItemPathAttributes.cs │ │ │ └── WindowsPhonePaths.cs │ │ │ └── net │ │ │ ├── WindowUniversalHttpRequest.cs │ │ │ └── WindowsUniversalHttpResponse.cs │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-io.csproj │ │ ├── jsimple-io.csproj.DotSettings │ │ ├── jsimple-io.sln │ │ └── nontranslated │ │ │ └── jsimple │ │ │ └── io │ │ │ ├── DebugWriter.cs │ │ │ ├── DotNetIOUtils.cs │ │ │ ├── DotNetStreamInputStream.cs │ │ │ └── DotNetStreamOutputStream.cs │ ├── jsimple-io.iml │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ ├── java-nontranslated │ │ │ │ └── jsimple │ │ │ │ │ ├── io │ │ │ │ │ ├── FileSystemDirectory.java │ │ │ │ │ ├── FileSystemFile.java │ │ │ │ │ ├── JSimpleIO.java │ │ │ │ │ ├── JSimpleInputStreamOnJavaStream.java │ │ │ │ │ ├── JSimpleOutputStreamOnJavaStream.java │ │ │ │ │ ├── JavaIOUtils.java │ │ │ │ │ └── JavaPaths.java │ │ │ │ │ └── net │ │ │ │ │ ├── JavaHttpRequest.java │ │ │ │ │ ├── JavaHttpResponse.java │ │ │ │ │ ├── JavaSocket.java │ │ │ │ │ └── JavaTcpSocketListener.java │ │ │ └── java │ │ │ │ └── jsimple │ │ │ │ ├── io │ │ │ │ ├── AutoFlushWriter.java │ │ │ │ ├── BufferedReader.java │ │ │ │ ├── ByteArrayInputStream.java │ │ │ │ ├── ByteArrayOutputStream.java │ │ │ │ ├── CharConversionException.java │ │ │ │ ├── ClosedListener.java │ │ │ │ ├── Directory.java │ │ │ │ ├── DirectoryVisitor.java │ │ │ │ ├── File.java │ │ │ │ ├── FileVisitor.java │ │ │ │ ├── FilterWriter.java │ │ │ │ ├── IOException.java │ │ │ │ ├── IOUtils.java │ │ │ │ ├── InputStream.java │ │ │ │ ├── Latin1InputStreamReader.java │ │ │ │ ├── Latin1OutputStreamWriter.java │ │ │ │ ├── MurmurHash3.java │ │ │ │ ├── OutputStream.java │ │ │ │ ├── Path.java │ │ │ │ ├── PathAttributes.java │ │ │ │ ├── PathNotFoundException.java │ │ │ │ ├── Paths.java │ │ │ │ ├── Reader.java │ │ │ │ ├── SequenceInputStream.java │ │ │ │ ├── StdIO.java │ │ │ │ ├── StringReader.java │ │ │ │ ├── StringWriter.java │ │ │ │ ├── SubstreamInputStream.java │ │ │ │ ├── Utf8InputStreamReader.java │ │ │ │ ├── Utf8OutputStreamWriter.java │ │ │ │ ├── VisitFailed.java │ │ │ │ └── Writer.java │ │ │ │ ├── net │ │ │ │ ├── HttpRequest.java │ │ │ │ ├── HttpRequestParams.java │ │ │ │ ├── HttpResponse.java │ │ │ │ ├── Socket.java │ │ │ │ ├── SocketConnectionHandler.java │ │ │ │ ├── SocketListener.java │ │ │ │ ├── SocketTimeoutException.java │ │ │ │ ├── UnknownHostException.java │ │ │ │ ├── Url.java │ │ │ │ ├── UrlDecoder.java │ │ │ │ └── UrlEncoder.java │ │ │ │ └── pushnotifications │ │ │ │ └── PushNotificationsReceiver.java │ │ └── test │ │ │ ├── java │ │ │ └── jsimple │ │ │ │ ├── io │ │ │ │ ├── BufferedReaderTest.java │ │ │ │ ├── ByteArrayInputStreamTest.java │ │ │ │ ├── ByteArrayOutputStreamTest.java │ │ │ │ ├── DirectoryTest.java │ │ │ │ ├── InputStreamReaderTest.java-save │ │ │ │ ├── MurmurHash3Test.java │ │ │ │ ├── SequenceInputStreamTest.java │ │ │ │ ├── StringReaderTest.java │ │ │ │ ├── StringWriterTest.java │ │ │ │ ├── SubstreamInputStreamTest.java │ │ │ │ ├── Utf8InputStreamReaderTest.java │ │ │ │ └── Utf8OutputStreamWriterTest.java │ │ │ │ └── net │ │ │ │ ├── UrlDecoderTest.java │ │ │ │ ├── UrlEncoderTest.java │ │ │ │ └── UrlTest.java │ │ │ └── resources │ │ │ ├── UTF-8-test.unicode │ │ │ ├── UTF-8-test.utf8 │ │ │ └── plain-text.txt │ └── testfile.txt ├── jsimple-json │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c#-test │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-json-test.csproj │ │ ├── jsimple-json-test.csproj.DotSettings │ │ └── packages.config │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── jsimple-json.csproj │ ├── jsimple-json.iml │ ├── json.iml │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── jsimple │ │ │ └── json │ │ │ ├── Json.java │ │ │ ├── JsonException.java │ │ │ ├── objectmodel │ │ │ ├── JsonArray.java │ │ │ ├── JsonNull.java │ │ │ ├── JsonObject.java │ │ │ ├── JsonObjectOrArray.java │ │ │ └── ObjectModelParser.java │ │ │ ├── readerwriter │ │ │ ├── JsonArrayProperty.java │ │ │ ├── JsonArrayReader.java │ │ │ ├── JsonArrayWriter.java │ │ │ ├── JsonBooleanProperty.java │ │ │ ├── JsonDoubleProperty.java │ │ │ ├── JsonIntProperty.java │ │ │ ├── JsonLongProperty.java │ │ │ ├── JsonObjectProperty.java │ │ │ ├── JsonObjectReader.java │ │ │ ├── JsonObjectType.java │ │ │ ├── JsonObjectWriter.java │ │ │ ├── JsonProperty.java │ │ │ └── JsonStringProperty.java │ │ │ └── text │ │ │ ├── JsonParsingException.java │ │ │ ├── Serializer.java │ │ │ ├── Token.java │ │ │ └── TokenType.java │ │ └── test │ │ └── java │ │ └── jsimple │ │ └── json │ │ ├── JsonParserTest.java │ │ ├── JsonSerializerTest.java │ │ ├── ReaderWriterTest.java │ │ └── TokenTest.java ├── jsimple-logging-api │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── jsimple-logging-api.csproj │ ├── jsimple-logging-api.iml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── jsimple │ │ └── logging │ │ ├── ILoggerFactory.java │ │ ├── Level.java │ │ ├── LogEnterLeave.java │ │ ├── Logger.java │ │ ├── LoggerFactory.java │ │ └── helpers │ │ └── NOPLogger.java ├── jsimple-logging-stdimpl │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-logging-stdimpl.csproj │ │ └── jsimple-logging-stdimpl.csproj.DotSettings │ ├── jsimple-logging-stdimpl.iml │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── jsimple │ │ │ └── logging │ │ │ └── stdimpl │ │ │ ├── Appender.java │ │ │ ├── LogEnterLeaveStdImpl.java │ │ │ ├── LoggingEvent.java │ │ │ ├── StdLogger.java │ │ │ ├── StdLoggerFactory.java │ │ │ └── WriterAppender.java │ │ └── test │ │ └── java │ │ └── jsimple │ │ └── logging │ │ └── stdimpl │ │ └── StdLoggerFactoryTest.java ├── jsimple-oauth │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-oauth.csproj │ │ ├── jsimple-oauth.csproj.DotSettings │ │ └── jsimple-oauth.sln │ ├── jsimple-oauth.iml │ ├── original-scribe-1.3.1-sources.zip │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── jsimple │ │ │ └── oauth │ │ │ ├── builder │ │ │ ├── ServiceBuilder.java │ │ │ └── api │ │ │ │ ├── DefaultOAuthApi10a.java │ │ │ │ ├── DefaultOAuthApi20.java │ │ │ │ ├── DropBoxOAuthApi.java │ │ │ │ ├── FacebookOAuthApi.java │ │ │ │ ├── FlickrOAuthApi.java │ │ │ │ ├── GoogleOAuthApi.java │ │ │ │ ├── LiveOAuthApi.java │ │ │ │ ├── OAuthApi.java │ │ │ │ ├── Px500OAuthApi.java │ │ │ │ ├── TumblrOAuthApi.java │ │ │ │ └── TwitterOAuthApi.java │ │ │ ├── exceptions │ │ │ ├── OAuthConnectionException.java │ │ │ ├── OAuthException.java │ │ │ └── OAuthParametersMissingException.java │ │ │ ├── extractors │ │ │ ├── AccessTokenExtractor.java │ │ │ ├── BaseStringExtractor.java │ │ │ ├── BaseStringExtractorImpl.java │ │ │ ├── HeaderExtractor.java │ │ │ ├── HeaderExtractorImpl.java │ │ │ ├── JsonTokenExtractor.java │ │ │ ├── RequestTokenExtractor.java │ │ │ ├── TokenExtractor20Impl.java │ │ │ └── TokenExtractorImpl.java │ │ │ ├── model │ │ │ ├── OAuthConfig.java │ │ │ ├── OAuthConstants.java │ │ │ ├── OAuthLogger.java │ │ │ ├── OAuthRequest.java │ │ │ ├── OAuthResponse.java │ │ │ ├── Parameter.java │ │ │ ├── ParameterList.java │ │ │ ├── SignatureType.java │ │ │ ├── Token.java │ │ │ ├── Verb.java │ │ │ └── Verifier.java │ │ │ ├── oauth │ │ │ ├── OAuth10aServiceImpl.java │ │ │ ├── OAuth20ServiceImpl.java │ │ │ └── OAuthService.java │ │ │ ├── services │ │ │ ├── HMACSha1SignatureService.java │ │ │ ├── PlaintextSignatureService.java │ │ │ ├── SignatureService.java │ │ │ ├── TimestampService.java │ │ │ └── TimestampServiceImpl.java │ │ │ └── utils │ │ │ ├── MapUtils.java │ │ │ ├── OAuthEncoder.java │ │ │ └── Sha1.java │ │ └── test │ │ └── java │ │ └── jsimple │ │ └── oauth │ │ └── utils │ │ └── Sha1Test.java ├── jsimple-unit │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-unit.csproj │ │ ├── jsimple-unit.csproj.DotSettings │ │ ├── nontranslated │ │ │ └── jsimple │ │ │ │ └── unit │ │ │ │ └── UnitTest.cs │ │ └── packages.config │ ├── jsimple-unit.iml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java-nontranslated │ │ │ └── jsimple │ │ │ │ └── unit │ │ │ │ └── UnitTest.java │ │ └── java │ │ │ └── jsimple │ │ │ └── unit │ │ │ └── UnitTestBase.java │ │ └── test │ │ └── java │ │ └── jsimple │ │ └── unit │ │ └── UnitTestsTest.java ├── jsimple-util │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.m2e.core.prefs │ ├── build.gradle │ ├── c#-test │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── jsimple-util-test.csproj │ ├── c# │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── jsimple-util.csproj │ │ ├── jsimple-util.csproj.DotSettings │ │ └── nontranslated │ │ │ └── jsimple │ │ │ ├── lang │ │ │ ├── AutoCloseable.cs │ │ │ └── Iterable.cs │ │ │ └── util │ │ │ ├── BasicException.cs │ │ │ ├── Iterator.cs │ │ │ └── SystemUtils.cs │ ├── jsimple-util.iml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java-nontranslated │ │ │ └── jsimple │ │ │ │ ├── lang │ │ │ │ ├── AutoCloseable.java │ │ │ │ └── Iterable.java │ │ │ │ └── util │ │ │ │ ├── BasicException.java │ │ │ │ ├── Iterator.java │ │ │ │ └── SystemUtils.java │ │ └── java │ │ │ └── jsimple │ │ │ ├── lang │ │ │ ├── Comparable.java │ │ │ └── Math.java │ │ │ └── util │ │ │ ├── ArrayList.java │ │ │ ├── Arrays.java │ │ │ ├── Base64.java │ │ │ ├── BoxedInteger.java │ │ │ ├── BoxedLong.java │ │ │ ├── ByteArrayRange.java │ │ │ ├── Characters.java │ │ │ ├── Collection.java │ │ │ ├── Comparator.java │ │ │ ├── DateTime.java │ │ │ ├── Doubles.java │ │ │ ├── Equatable.java │ │ │ ├── HashMap.java │ │ │ ├── HashMapEntry.java │ │ │ ├── HashSet.java │ │ │ ├── Integers.java │ │ │ ├── InvalidFormatException.java │ │ │ ├── List.java │ │ │ ├── Lists.java │ │ │ ├── Longs.java │ │ │ ├── Map.java │ │ │ ├── MapEntry.java │ │ │ ├── MapEntryImpl.java │ │ │ ├── MatchBuilder.java │ │ │ ├── MatchPattern.java │ │ │ ├── MessageFormatter.java │ │ │ ├── OptionalInteger.java │ │ │ ├── ProgrammerError.java │ │ │ ├── Random.java │ │ │ ├── Set.java │ │ │ ├── StringBuilders.java │ │ │ ├── StringIterator.java │ │ │ ├── StringTokenizer.java │ │ │ ├── Strings.java │ │ │ ├── SystemUtilsBase.java │ │ │ ├── TextualPath.java │ │ │ ├── Utils.java │ │ │ └── function │ │ │ └── CharPredicate.java │ │ └── test │ │ └── java │ │ └── jsimple │ │ └── util │ │ ├── AbstractMapTest.java │ │ ├── ArrayListTest.java │ │ ├── ArraysTest.java │ │ ├── Base64Test.java │ │ ├── CollectionTest.java │ │ ├── DateTimeTest.java │ │ ├── HashMapTest.java │ │ ├── HashSetTest.java │ │ ├── IntegersTest.java │ │ ├── ListTest.java │ │ ├── ListsTest.java │ │ ├── LongsTest.java │ │ ├── MessageFormatterTest.java │ │ ├── StringIteratorTest.java │ │ ├── StringsTest.java │ │ └── TextualPathTest.java ├── jsimple.iml └── libraries.iml ├── samples ├── good-friends │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.jdt.ui.prefs │ ├── build.gradle │ ├── c# │ │ ├── App.config │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── good-friends.csproj │ │ └── good-friends.sln │ ├── good-friends.iml │ └── src │ │ └── main │ │ └── java │ │ └── goodfriends │ │ ├── GoodFriends.java │ │ ├── azure │ │ ├── AzureMobileConnector.java │ │ ├── AzureMobileFacade.java │ │ └── AzureMobileParser.java │ │ ├── facebook │ │ ├── FacebookAuthenticator.java │ │ ├── FacebookConnector.java │ │ ├── FacebookFacade.java │ │ └── FacebookParser.java │ │ ├── local │ │ ├── LocalFileConnector.java │ │ └── LocalFileFacade.java │ │ ├── model │ │ ├── ApplicationModelRoot.java │ │ ├── FacebookFriend.java │ │ └── FacebookPost.java │ │ └── util │ │ ├── Connector.java │ │ └── Constants.java └── samples.iml ├── settings.gradle └── shared.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | # IDEA user specific files (rest of files in .idea directory should be checked in) 4 | .idea/workspace.xml 5 | .idea/tasks.xml 6 | 7 | # Generated C# files 8 | **/c#/jsimple 9 | **/c#/goodfriends 10 | **/c#-test/jsimple 11 | 12 | # Generated C++ files 13 | **/c++/jsimple 14 | **/c++/goodfriends 15 | **/c++-test/jsimple 16 | 17 | 18 | # Visual Studio related files 19 | *.suo 20 | *.csproj.user 21 | *.DotSettings.user 22 | obj/ 23 | [Bb]in/ 24 | 25 | .gradle/ 26 | 27 | 28 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | jsimple -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | -------------------------------------------------------------------------------- /.idea/copyright/Apache_Commons_Net_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/Apache_Harmony_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/BlowfishJ_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/Default_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/JUnit_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/Joda_Time_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/Logback_originated_source_copyright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_intellij_annotations_9_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__junit_junit_4_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/scopes/Apache_Commons_Net_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/BlowfishJ_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/JUnit_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/Joda_Time_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/Logback_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/SLFJ_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/Scribe_originated_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple 4 | 5 | 6 | java-to-csharp-converter-maven-plugin 7 | jsimple-io 8 | jsimple-json 9 | jsimple-logging-api 10 | jsimple-logging-stdimpl 11 | jsimple-oauth 12 | jsimple-unit 13 | jsimple-util 14 | msbuild-maven-package-plugin 15 | msbuild-maven-plugin 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.m2e.core.maven2Nature 26 | 27 | 28 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | ============================================================================= 2 | = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = 3 | ============================================================================= 4 | This product includes software developed by Joda.org (http://www.joda.org/). 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JSimple is a set of shared Java utility code. It's design goals are to be simple--minimal sized 2 | with no external dependencies--and friendly to conversion from Java to C#/C++/ObjectiveC via the 3 | JUniversal converters. 4 | 5 | See full site here: http://www.juniversal.org 6 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | task wrapper(type: Wrapper) { 24 | gradleVersion = '2.2.1' 25 | } 26 | 27 | buildscript { 28 | apply from: 'shared.gradle' 29 | } 30 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 13 02:44:00 EST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /jsimple.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libraries/c#/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/c#/packages/NUnit.2.6.2/NUnit.2.6.2.nupkg -------------------------------------------------------------------------------- /libraries/c#/packages/NUnit.2.6.2/NUnit.2.6.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NUnit 5 | 2.6.2 6 | NUnit 7 | Charlie Poole 8 | Charlie Poole 9 | http://nunit.org/nuget/license.html 10 | http://nunit.org/ 11 | http://nunit.org/nuget/nunit_32x32.png 12 | false 13 | NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible. A number of runners, both from the NUnit project and by third parties, are able to execute NUnit tests. 14 | 15 | Version 2.6 is the seventh major release of this well-known and well-tested programming tool. 16 | 17 | This package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner. 18 | NUnit is a unit-testing framework for all .Net languages with a strong TDD focus. 19 | Version 2.6 is the seventh major release of NUnit. 20 | 21 | Unlike earlier versions, this package includes only the framework assembly. You will need to install the NUnit.Runners package unless you are using a third-party runner. 22 | 23 | The nunit.mocks assembly is now provided by the NUnit.Mocks package. The pnunit.framework assembly is provided by the pNUnit package. 24 | en-US 25 | test testing tdd framework fluent assert theory plugin addin 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /libraries/c#/packages/NUnit.2.6.2/lib/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/c#/packages/NUnit.2.6.2/lib/nunit.framework.dll -------------------------------------------------------------------------------- /libraries/c#/packages/NUnit.2.6.2/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/c#/packages/NUnit.2.6.2/license.txt -------------------------------------------------------------------------------- /libraries/c#/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraries/jsimple-io/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /libraries/jsimple-io/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-io 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-unit 7 | jsimple-util 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.jdt.core.javanature 19 | org.eclipse.m2e.core.maven2Nature 20 | 21 | -------------------------------------------------------------------------------- /libraries/jsimple-io/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding//src/test/resources=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /libraries/jsimple-io/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-io/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=false 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-io/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | 25 | description = '''JSimple stream, file, and network I/O utilities''' 26 | 27 | dependencies { 28 | compile group: 'com.intellij', name: 'annotations', version: '9.0.4' 29 | compile project(':libraries:jsimple-util') 30 | 31 | testCompile project(':libraries:jsimple-unit') 32 | } 33 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-io-test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-io-test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("64b6dc59-1d98-4a0e-8ed4-d6a3cee0ee03")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-test/jsimple-io-test.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-desktop/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-io-windows-desktop")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-io-windows-desktop")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("004ab970-bf17-4f5a-af6c-48ffb77663d1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-desktop/jsimple-io-windows-desktop.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-desktop/nontranslated/jsimple/net/TcpClientSocket.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System.IO; 24 | using System.Net.Sockets; 25 | using jsimple.io; 26 | 27 | namespace jsimple.net 28 | { 29 | public class TcpClientSocket : Socket 30 | { 31 | private TcpClient tcpClient; 32 | 33 | public TcpClientSocket(TcpClient tcpClient) 34 | { 35 | this.tcpClient = tcpClient; 36 | } 37 | 38 | public override InputStream getInputStream() 39 | { 40 | return new DotNetStreamInputStream(tcpClient.GetStream()); 41 | } 42 | 43 | public override OutputStream getOutputStream() 44 | { 45 | return new DotNetStreamOutputStream(tcpClient.GetStream()); 46 | } 47 | 48 | public override void close() 49 | { 50 | tcpClient.Close(); 51 | } 52 | 53 | public override bool isClosed() 54 | { 55 | return false /* !socket.Connected */; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-desktop/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System.Resources; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // markComplete of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple_io_windows_phone")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple_io_windows_phone")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // Setting ComVisible to false makes the types in this assembly not visible 19 | // to COM components. If you need to access a type in this assembly from 20 | // COM, markComplete the ComVisible attribute to true on that type. 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | [assembly: Guid("1eeab1c0-366b-4b49-b6fe-cb35791edc3e")] 25 | 26 | // Version information for an assembly consists of the following four values: 27 | // 28 | // Major Version 29 | // Minor Version 30 | // Build Number 31 | // Revision 32 | // 33 | // You can specify all the values or you can default the Revision and Build Numbers 34 | // by using the '*' as shown below: 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | [assembly: NeutralResourcesLanguageAttribute("en-US")] 38 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/jsimple-io-windows-phone.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/nontranslated/jsimple/io/JSimpleIO.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using jsimple.net; 24 | 25 | namespace jsimple.io 26 | { 27 | public class JSimpleIO 28 | { 29 | 30 | /// 31 | /// This method should be called before jsimple.net is used. It's normally called at app startup. It initializes 32 | /// any factory classes to use the default implementation appropriate for the current platform. 33 | /// 34 | public static void init() 35 | { 36 | HttpRequest.Factory = new WindowsPhoneHttpRequest.WindowsPhoneHttpRequestFactory(); 37 | Paths.Instance = new WindowsPhonePaths(); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/nontranslated/jsimple/io/OperationComplete.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System.Threading; 24 | 25 | namespace jsimple.io 26 | { 27 | public class OperationComplete 28 | { 29 | private bool done = false; 30 | 31 | public void wait() 32 | { 33 | lock (this) 34 | while (!done) 35 | Monitor.Wait(this); 36 | } 37 | 38 | public void mark 39 | 40 | 41 | } 42 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/nontranslated/jsimple/io/StorageItemPathAttributes.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using Windows.Storage; 24 | using Windows.Storage.FileProperties; 25 | using jsimple.util; 26 | 27 | namespace jsimple.io 28 | { 29 | public class StorageItemPathAttributes : PathAttributes 30 | { 31 | private readonly IStorageItem storageItem; 32 | private BasicProperties basicProperties = null; 33 | 34 | public StorageItemPathAttributes(IStorageItem storageItem) 35 | { 36 | this.storageItem = storageItem; 37 | } 38 | 39 | public BasicProperties getBasicProperties() 40 | { 41 | if (basicProperties == null) 42 | basicProperties = storageItem.GetBasicPropertiesAsync().DoSynchronously(); 43 | return basicProperties; 44 | } 45 | 46 | public override long LastModifiedTime 47 | { 48 | get { return PlatformUtils.toMillisFromDateTimeOffset(getBasicProperties().DateModified); } 49 | } 50 | 51 | public override long Size 52 | { 53 | get { return (long)getBasicProperties().Size; } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/nontranslated/jsimple/io/WindowsPhonePaths.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.IO.IsolatedStorage; 25 | using Windows.Storage; 26 | using jsimple.util; 27 | 28 | namespace jsimple.io 29 | { 30 | public class WindowsPhonePaths : Paths 31 | { 32 | StorageFolderDirectory applicationDataDirectory = null; 33 | 34 | /// the directory where the application should store its private data. 35 | public override Directory ApplicationDataDirectory 36 | { 37 | get 38 | { 39 | lock (this) 40 | { 41 | if (applicationDataDirectory == null) 42 | { 43 | if (applicationDataDirectory == null) 44 | applicationDataDirectory = new StorageFolderDirectory(null, ApplicationData.Current.LocalFolder); 45 | } 46 | } 47 | return applicationDataDirectory; 48 | } 49 | } 50 | 51 | public override Directory getFileSystemDirectory(string directoryPathString) 52 | { 53 | throw new BasicException("Not implemented"); 54 | } 55 | 56 | } 57 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-phone/nontranslated/jsimple/net2/JSimpleNet.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | namespace jsimple.net 24 | { 25 | public class JSimpleNet 26 | { 27 | 28 | /// 29 | /// This method should be called before jsimple.net is used. It's normally called at app startup. It initializes 30 | /// any factory classes to use the default implementation appropriate for the current platform. 31 | /// 32 | public static void init() 33 | { 34 | HttpRequest.Factory = new WindowsPhoneHttpRequest.WindowsPhoneHttpRequestFactory(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-store/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-io-windows-store")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-io-windows-store")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-store/jsimple-io-windows-store.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-universal/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-io-windows-universal")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-io-windows-universal")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-universal/nontranslated/jsimple/io/JSimpleIO.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using jsimple.net; 24 | 25 | namespace jsimple.io 26 | { 27 | public class JSimpleIO 28 | { 29 | private static bool initialized = false; 30 | 31 | /// 32 | /// This method should be called before jsimple.net is used. It's normally called at app startup. It initializes 33 | /// any factory classes to use the default implementation appropriate for the current platform. 34 | /// 35 | public static void init() 36 | { 37 | if (!initialized) 38 | { 39 | HttpRequest.setFactory(new WindowUniversalHttpRequest.WindowsPhoneHttpRequestFactory()); 40 | Paths.setInstance(new WindowsPhonePaths()); 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-universal/nontranslated/jsimple/io/StorageItemPathAttributes.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using Windows.Storage; 24 | using Windows.Storage.FileProperties; 25 | using jsimple.util; 26 | 27 | namespace jsimple.io 28 | { 29 | public class StorageItemPathAttributes : PathAttributes 30 | { 31 | private readonly IStorageItem storageItem; 32 | private BasicProperties basicProperties = null; 33 | 34 | public StorageItemPathAttributes(IStorageItem storageItem) 35 | { 36 | this.storageItem = storageItem; 37 | } 38 | 39 | public BasicProperties getBasicProperties() 40 | { 41 | if (basicProperties == null) 42 | basicProperties = storageItem.GetBasicPropertiesAsync().DoSynchronously(); 43 | return basicProperties; 44 | } 45 | 46 | public override long getLastModifiedTime() 47 | { 48 | return SystemUtils.toMillisFromDateTimeOffset(getBasicProperties().DateModified); 49 | } 50 | 51 | public override long getSize() 52 | { 53 | return (long)getBasicProperties().Size; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#-windows-universal/nontranslated/jsimple/io/WindowsPhonePaths.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using Windows.Storage; 25 | using jsimple.util; 26 | 27 | namespace jsimple.io 28 | { 29 | public class WindowsPhonePaths : Paths 30 | { 31 | StorageFolderDirectory applicationDataDirectory = null; 32 | 33 | /// the directory where the application should store its private data. 34 | public override Directory getApplicationDataDirectory() 35 | { 36 | lock (this) 37 | { 38 | if (applicationDataDirectory == null) 39 | { 40 | if (applicationDataDirectory == null) 41 | applicationDataDirectory = new StorageFolderDirectory(null, ApplicationData.Current.LocalFolder); 42 | } 43 | } 44 | return applicationDataDirectory; 45 | } 46 | 47 | public override Directory getFileSystemDirectory(string directoryPathString) 48 | { 49 | throw new BasicException("Not implemented"); 50 | } 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /libraries/jsimple-io/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-io")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-io")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-io/c#/jsimple-io.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True -------------------------------------------------------------------------------- /libraries/jsimple-io/c#/jsimple-io.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jsimple-io", "jsimple-io.csproj", "{0271A18C-EEAC-4CAC-BF2E-89A693B354EF}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Debug|ARM = Debug|ARM 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|Any CPU = Release|Any CPU 13 | Release|ARM = Release|ARM 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|ARM.ActiveCfg = Debug|ARM 21 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|ARM.Build.0 = Debug|ARM 22 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|x64.ActiveCfg = Debug|x64 23 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|x64.Build.0 = Debug|x64 24 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|x86.ActiveCfg = Debug|x86 25 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Debug|x86.Build.0 = Debug|x86 26 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|ARM.ActiveCfg = Release|ARM 29 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|ARM.Build.0 = Release|ARM 30 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|x64.ActiveCfg = Release|x64 31 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|x64.Build.0 = Release|x64 32 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|x86.ActiveCfg = Release|x86 33 | {0271A18C-EEAC-4CAC-BF2E-89A693B354EF}.Release|x86.Build.0 = Release|x86 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /libraries/jsimple-io/jsimple-io.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/ClosedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/9/13 4:59 PM 28 | */ 29 | @FunctionalInterface public interface ClosedListener { 30 | void onClosed(); 31 | } 32 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/DirectoryVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 11/6/12 2:51 AM 28 | */ 29 | public @FunctionalInterface interface DirectoryVisitor { 30 | public boolean visit(Directory directory); 31 | } 32 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/FileVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | 26 | public @FunctionalInterface interface FileVisitor { 27 | public abstract boolean visit(File file); 28 | } 29 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/PathAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 11/6/12 2:56 AM 28 | */ 29 | public abstract class PathAttributes { 30 | /** 31 | * @return last time the directory/file was modified, in millis. 32 | */ 33 | public abstract long getLastModifiedTime(); 34 | 35 | /** 36 | * @return for a file its size in bytes and for a directory the results are implementation specific 37 | */ 38 | public abstract long getSize(); 39 | } 40 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/PathNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | /** 26 | * This is a platform independent class used to represent file not found exceptions, taking the place of 27 | * java.io.FileNotFoundException in JSimple based code. 28 | * 29 | * @author Bret Johnson 30 | * @since 10/9/12 12:15 PM 31 | */ 32 | public class PathNotFoundException extends IOException { 33 | public PathNotFoundException(Throwable cause) { 34 | super(cause); 35 | } 36 | 37 | public PathNotFoundException(String message) { 38 | super(message); 39 | } 40 | 41 | public PathNotFoundException(String message, Object arg1) { 42 | super(message, arg1); 43 | } 44 | 45 | public PathNotFoundException(String message, Object arg1, Object arg2) { 46 | super(message, arg1, arg2); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/io/VisitFailed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.io; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 11/6/12 2:51 AM 28 | */ 29 | public @FunctionalInterface interface VisitFailed { 30 | /** 31 | * Called to indicate that the visit to the file/directory fails (e.g. because don't have rights to read the 32 | * file/directory attributes). 33 | * 34 | * @param name 35 | * @param exception 36 | * @return true to continue, false to abort 37 | */ 38 | public boolean visitFailed(String name, IOException exception); 39 | } 40 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/net/Socket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | import jsimple.io.InputStream; 26 | import jsimple.io.OutputStream; 27 | 28 | /** 29 | * @author Bret Johnson 30 | * @since 7/24/13 11:07 PM 31 | */ 32 | public abstract class Socket extends jsimple.lang.AutoCloseable { 33 | public abstract InputStream getInputStream(); 34 | 35 | public abstract OutputStream getOutputStream(); 36 | 37 | public abstract boolean isClosed(); 38 | } 39 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/net/SocketConnectionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 8/10/13 12:57 PM 28 | */ 29 | public interface SocketConnectionHandler { 30 | public void sockedConnected(Socket socket); 31 | } 32 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/net/SocketTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | import jsimple.io.IOException; 26 | 27 | /** 28 | * This is a platform independent class used to represent network timeout exceptions, taking the place of 29 | * java.net.SocketTimeoutException in JSimple based code. 30 | * 31 | * @author Bret Johnson 32 | * @since 10/6/12 5:27 PM 33 | */ 34 | public class SocketTimeoutException extends IOException { 35 | public SocketTimeoutException(Throwable cause) { 36 | // TODO: Test to see what cause.toString ends up with in C# 37 | this(cause.toString(), cause); 38 | } 39 | 40 | public SocketTimeoutException(String message) { 41 | super(message); 42 | } 43 | 44 | public SocketTimeoutException(String message, Throwable cause) { 45 | super(message, cause); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/net/UnknownHostException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | import jsimple.io.IOException; 26 | 27 | /** 28 | * This is a platform independent class used to represent I/O exceptions, taking the place of java.io.IOException in 29 | * JSimple based code. 30 | * 31 | * @author Bret Johnson 32 | * @since 10/6/12 5:27 PM 33 | */ 34 | public class UnknownHostException extends IOException { 35 | public UnknownHostException(Throwable cause) { 36 | super(cause); 37 | } 38 | 39 | public UnknownHostException(String message) { 40 | super(message); 41 | } 42 | 43 | public UnknownHostException(String message, Throwable cause) { 44 | super(message, cause); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/main/java/jsimple/net/Url.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | import org.jetbrains.annotations.Nullable; 26 | 27 | /** 28 | * @author Bret Johnson 29 | * @since 10/7/12 3:28 AM 30 | */ 31 | public class Url { 32 | private String url; 33 | 34 | public Url(String url) { 35 | this.url = url; 36 | } 37 | 38 | /** 39 | * Return the query part of the URL or null if there is no query party. For example: 40 | *

41 | * http://www.acme.com/abc?foo=3&bar=4#abcdef => foo=3&bar=4 42 | *

43 | * http://www.acme.com/abc => null 44 | * 45 | * @return query part of URL or null 46 | */ 47 | public @Nullable String getQuery() { 48 | int questionMarkIndex = url.indexOf('?'); 49 | if (questionMarkIndex == -1) 50 | return null; 51 | else { 52 | int queryStartIndex = questionMarkIndex + 1; 53 | 54 | int hashIndex = url.indexOf('#', queryStartIndex); 55 | if (hashIndex == -1) 56 | return url.substring(queryStartIndex); 57 | else return url.substring(queryStartIndex, hashIndex); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/test/java/jsimple/net/UrlEncoderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.net; 24 | 25 | import jsimple.unit.UnitTest; 26 | import org.junit.Test; 27 | 28 | /** 29 | * @author Bret Johnson 30 | * @since 11/25/12 10:58 PM 31 | */ 32 | public class UrlEncoderTest extends UnitTest { 33 | @Test public void testEncode() { 34 | assertEquals(".-_*", UrlEncoder.encode(".-_*")); // None encoded 35 | assertEquals("%24%2B%21%27%28%29%2C", UrlEncoder.encode("$+!'(),")); // All encoded 36 | assertEquals("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 37 | UrlEncoder.encode("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")); // None encoded 38 | assertEquals("x%C3%AB%C4%86%D2%B8abc%EF%AE%9A", UrlEncoder.encode("x\u00eb\u0106\u04b8abc\ufb9a")); 39 | assertEquals("abc%3Ddef%3Fsdf%26hil+sdlkfj+l+sdf+slkdfj+123%26def", 40 | UrlEncoder.encode("abc=def?sdf&hil sdlkfj l sdf slkdfj 123&def")); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /libraries/jsimple-io/src/test/resources/UTF-8-test.unicode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/jsimple-io/src/test/resources/UTF-8-test.unicode -------------------------------------------------------------------------------- /libraries/jsimple-io/src/test/resources/UTF-8-test.utf8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/jsimple-io/src/test/resources/UTF-8-test.utf8 -------------------------------------------------------------------------------- /libraries/jsimple-io/src/test/resources/plain-text.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 2 | Aenean commodo ligula eget dolor. Aenean massa. 3 | Cum sociis natoque penatibus et magnis dis parturient montes, 4 | nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, 5 | pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, 6 | aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, 7 | justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. 8 | Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. 9 | Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. 10 | Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper 11 | ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing 12 | sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae 13 | sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. 14 | Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, 15 | 16 | -------------------------------------------------------------------------------- /libraries/jsimple-io/testfile.txt: -------------------------------------------------------------------------------- 1 | hello there -------------------------------------------------------------------------------- /libraries/jsimple-json/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libraries/jsimple-json/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-json 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-unit 7 | jsimple-util 8 | jsimple-io 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | org.eclipse.m2e.core.maven2Builder 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javanature 20 | org.eclipse.m2e.core.maven2Nature 21 | 22 | -------------------------------------------------------------------------------- /libraries/jsimple-json/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /libraries/jsimple-json/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-json/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-json/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | description = 'JSimple JSON read/write support' 25 | 26 | dependencies { 27 | compile project(':libraries:jsimple-util') 28 | compile project(':libraries:jsimple-io') 29 | compile group: 'com.intellij', name: 'annotations', version: '9.0.4' 30 | testCompile project(':libraries:jsimple-unit') 31 | } 32 | -------------------------------------------------------------------------------- /libraries/jsimple-json/c#-test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-json-test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-json-test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9470ae4e-9a97-406d-a73b-e481abbb783c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libraries/jsimple-json/c#-test/jsimple-json-test.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /libraries/jsimple-json/c#-test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libraries/jsimple-json/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-json")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-json")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | [assembly:InternalsVisibleTo("jsimple-json-test")] 33 | -------------------------------------------------------------------------------- /libraries/jsimple-json/jsimple-json.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libraries/jsimple-json/json.iml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/JsonException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json; 24 | 25 | import jsimple.util.BasicException; 26 | 27 | /** 28 | * @author Bret Johnson 29 | * @since 9/15/12 5:32 PM 30 | */ 31 | public class JsonException extends BasicException { 32 | public JsonException(Throwable cause) { 33 | super(cause); 34 | } 35 | 36 | public JsonException(String message) { 37 | super(message); 38 | } 39 | 40 | public JsonException(String message, Object arg1) { 41 | super(message, arg1); 42 | } 43 | 44 | public JsonException(String message, Object arg1, Object arg2) { 45 | super(message, arg1, arg2); 46 | } 47 | 48 | public JsonException(String message, Object... args) { 49 | super(message, args); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/objectmodel/JsonNull.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.objectmodel; 24 | 25 | /** 26 | * This class is used to represent a "null" literal in JSON. By having an explicit class, instead of just the regular 27 | * Java null, we can differentiate more easily between an object not existing in the JSON and it existing and having the 28 | * explicit JSON literal value "null". 29 | * 30 | * @author Bret Johnson 31 | * @since 5/20/12 9:52 PM 32 | */ 33 | // TODO: Remove this & just treat as null 34 | public final class JsonNull { 35 | static public JsonNull singleton = new JsonNull(); 36 | 37 | private JsonNull() { 38 | } 39 | 40 | @Override public String toString() { 41 | return "JSON null primitive"; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonArrayProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:11 PM 28 | */ 29 | public class JsonArrayProperty extends JsonProperty { 30 | public JsonArrayProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public JsonArrayReader readValue(JsonObjectReader objectReader) { 35 | return (JsonArrayReader) objectReader.readPropertyValue(); 36 | } 37 | 38 | public JsonArrayWriter write(JsonObjectWriter objectWriter) { 39 | return objectWriter.writeArrayProperty(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonBooleanProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:09 PM 28 | */ 29 | public class JsonBooleanProperty extends JsonProperty { 30 | public JsonBooleanProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public boolean readValue(JsonObjectReader objectReader) { 35 | return (boolean) (Boolean) objectReader.readPropertyValue(); 36 | } 37 | 38 | @Override public Object readValueUntyped(JsonObjectReader objectReader) { 39 | return objectReader.readPropertyValue(); 40 | } 41 | 42 | public void write(JsonObjectWriter objectWriter, boolean value) { 43 | objectWriter.writeProperty(this, value); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonDoubleProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:08 PM 28 | */ 29 | public class JsonDoubleProperty extends JsonProperty { 30 | public JsonDoubleProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public double readValue(JsonObjectReader objectReader) { 35 | return (double) (Double) objectReader.readPropertyValue(); 36 | } 37 | 38 | @Override public Object readValueUntyped(JsonObjectReader objectReader) { 39 | return objectReader.readPropertyValue(); 40 | } 41 | 42 | public void write(JsonObjectWriter objectWriter, double value) { 43 | objectWriter.writeProperty(this, value); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonIntProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/17/13 12:40 AM 28 | */ 29 | public class JsonIntProperty extends JsonProperty { 30 | public JsonIntProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public int readValue(JsonObjectReader objectReader) { 35 | return (int) (Integer) objectReader.readPropertyValue(); 36 | } 37 | 38 | @Override public Object readValueUntyped(JsonObjectReader objectReader) { 39 | return objectReader.readPropertyValue(); 40 | } 41 | 42 | public void write(JsonObjectWriter objectWriter, int value) { 43 | objectWriter.writeProperty(this, value); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonLongProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:08 PM 28 | */ 29 | public class JsonLongProperty extends JsonProperty { 30 | public JsonLongProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | // TODO: Automatically convert int to long 35 | public long readValue(JsonObjectReader objectReader) { 36 | Object value = objectReader.readPropertyValue(); 37 | if (value instanceof Integer) 38 | return (long) (int) (Integer) value; 39 | else return (long) (Long) value; 40 | } 41 | 42 | @Override public Object readValueUntyped(JsonObjectReader objectReader) { 43 | return objectReader.readPropertyValue(); 44 | } 45 | 46 | public void write(JsonObjectWriter objectWriter, long value) { 47 | objectWriter.writeProperty(this, value); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonObjectProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:12 PM 28 | */ 29 | public class JsonObjectProperty extends JsonProperty { 30 | public JsonObjectProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public JsonObjectReader readValue(JsonObjectReader objectReader) { 35 | return (JsonObjectReader) objectReader.readPropertyValue(); 36 | } 37 | 38 | public JsonObjectWriter write(JsonObjectWriter objectWriter) { 39 | return objectWriter.writeObjectProperty(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/17/13 12:40 AM 28 | */ 29 | public class JsonProperty { 30 | protected String name; 31 | protected int id; 32 | 33 | public JsonProperty(String name) { 34 | this.name = name; 35 | this.id = -1; 36 | } 37 | 38 | public JsonProperty(String name, int id) { 39 | this.name = name; 40 | this.id = id; 41 | } 42 | 43 | public Object readValueUntyped(JsonObjectReader objectReader) { 44 | return objectReader.readPropertyValue(); 45 | } 46 | 47 | public String getName() { 48 | return name; 49 | } 50 | 51 | public int getId() { 52 | return id; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/readerwriter/JsonStringProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.readerwriter; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/22/13 9:07 PM 28 | */ 29 | public class JsonStringProperty extends JsonProperty { 30 | public JsonStringProperty(String name, int id) { 31 | super(name, id); 32 | } 33 | 34 | public String readValue(JsonObjectReader objectReader) { 35 | return (String) objectReader.readPropertyValue(); 36 | } 37 | 38 | @Override public Object readValueUntyped(JsonObjectReader objectReader) { 39 | return objectReader.readPropertyValue(); 40 | } 41 | 42 | public void write(JsonObjectWriter objectWriter, String value) { 43 | objectWriter.writeProperty(this, value); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/text/JsonParsingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.text; 24 | 25 | import jsimple.json.JsonException; 26 | 27 | /** 28 | * @author Bret Johnson 29 | * @since 5/6/12 2:13 AM 30 | */ 31 | public final class JsonParsingException extends JsonException { 32 | public JsonParsingException(String message) { 33 | super(message); 34 | } 35 | 36 | public JsonParsingException(String expected, String encountered) { 37 | super("Expected {} but encountered {}", expected, encountered); 38 | } 39 | 40 | public JsonParsingException(String expected, Token token) { 41 | this(expected, token.getDescription()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /libraries/jsimple-json/src/main/java/jsimple/json/text/TokenType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.json.text; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/6/12 1:02 AM 28 | */ 29 | public enum TokenType { 30 | LEFT_BRACE, 31 | RIGHT_BRACE, 32 | LEFT_BRACKET, 33 | RIGHT_BRACKET, 34 | COMMA, 35 | COLON, 36 | PRIMITIVE, 37 | EOF 38 | } 39 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-logging-api 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-util 7 | jsimple-unit 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.jdt.core.javanature 19 | org.eclipse.m2e.core.maven2Nature 20 | 21 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding/=UTF-8 4 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | description = '''JSimple logging API, behind which different loggers can be supplied. Based off of SLF4J''' 25 | 26 | dependencies { 27 | compile project(':libraries:jsimple-util') 28 | compile group: 'com.intellij', name: 'annotations', version:'9.0.4' 29 | testCompile project(':libraries:jsimple-unit') 30 | } 31 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-logging-api")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-logging-api")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/jsimple-logging-api.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-api/src/main/java/jsimple/logging/LogEnterLeave.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.logging; 24 | 25 | /** 26 | * @author Bret Johnson 27 | * @since 5/27/13 12:27 AM 28 | */ 29 | public abstract class LogEnterLeave extends jsimple.lang.AutoCloseable { 30 | } 31 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-logging-stdimpl 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-logging-api 7 | jsimple-util 8 | jsimple-unit 9 | jsimple-io 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javabuilder 14 | 15 | 16 | org.eclipse.m2e.core.maven2Builder 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | description = '''JSimple logging implementation, based off of logback''' 24 | 25 | dependencies { 26 | compile project(':libraries:jsimple-logging-api') 27 | compile group: 'com.intellij', name: 'annotations', version: '9.0.4' 28 | compile project(':libraries:jsimple-util') 29 | compile project(':libraries:jsimple-io') 30 | testCompile project(':libraries:jsimple-unit') 31 | } 32 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-logging-stdimpl")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-logging-stdimpl")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/c#/jsimple-logging-stdimpl.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/jsimple-logging-stdimpl.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/src/main/java/jsimple/logging/stdimpl/Appender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015 Microsoft Mobile. All Rights Reserved. 3 | * 4 | * This file is based on or incorporates material from Logback http://logback.qos.ch 5 | * (collectively, "Third Party Code"). Microsoft Mobile is not the original 6 | * author of the Third Party Code. 7 | * 8 | * This program and the accompanying materials are made available under the terms 9 | * of the Eclipse Public License v1.0 which accompanies this distribution, and is 10 | * available at http://www.eclipse.org/legal/epl-v10.html. 11 | */ 12 | 13 | package jsimple.logging.stdimpl; 14 | 15 | /** 16 | * Note that Appenders MUST BE THREAD SAFE! 17 | * 18 | * @author Bret Johnson 19 | * @since 4/8/13 12:39 AM 20 | */ 21 | public abstract class Appender { 22 | abstract public void append(LoggingEvent loggingEvent); 23 | } 24 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/src/main/java/jsimple/logging/stdimpl/WriterAppender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015 Microsoft Mobile. All Rights Reserved. 3 | * 4 | * This file is based on or incorporates material from Logback http://logback.qos.ch 5 | * (collectively, "Third Party Code"). Microsoft Mobile is not the original 6 | * author of the Third Party Code. 7 | * 8 | * This program and the accompanying materials are made available under the terms 9 | * of the Eclipse Public License v1.0 which accompanies this distribution, and is 10 | * available at http://www.eclipse.org/legal/epl-v10.html. 11 | */ 12 | 13 | package jsimple.logging.stdimpl; 14 | 15 | import jsimple.io.Writer; 16 | import jsimple.util.SystemUtils; 17 | import org.jetbrains.annotations.Nullable; 18 | 19 | /** 20 | * @author Bret Johnson 21 | * @since 4/11/13 4:10 PM 22 | */ 23 | public class WriterAppender extends Appender { 24 | Writer writer; 25 | boolean flushImmediately = true; 26 | 27 | public WriterAppender(Writer writer) { 28 | this.writer = writer; 29 | } 30 | 31 | @Override public void append(LoggingEvent loggingEvent) { 32 | synchronized (this) { 33 | writer.writeln(loggingEvent.getLevel().getDefaultDisplayName() + " " + loggingEvent.getLoggerName() + " - " + 34 | loggingEvent.getFormattedMessage()); 35 | 36 | @Nullable Throwable throwable = loggingEvent.getThrowable(); 37 | if (throwable != null) 38 | writer.writeln(SystemUtils.getExceptionDescription(throwable)); 39 | 40 | if (flushImmediately) 41 | writer.flush(); 42 | } 43 | 44 | /* 45 | #logback.classic pattern: %d [%thread] %-5level %logger{36} - %msg%n 46 | 2012-04-26 14:54:38,461 [main] DEBUG com.foo.App - Hello world 47 | 2012-04-26 14:54:38,461 [main] DEBUG com.foo.App - Hi again 48 | */ 49 | 50 | //To change body of implemented methods use File | Settings | File Templates. 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /libraries/jsimple-logging-stdimpl/src/test/java/jsimple/logging/stdimpl/StdLoggerFactoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.logging.stdimpl; 24 | 25 | import jsimple.io.JSimpleIO; 26 | import jsimple.logging.Level; 27 | import jsimple.logging.Logger; 28 | import jsimple.logging.LoggerFactory; 29 | import org.junit.Test; 30 | 31 | /** 32 | * @author Bret Johnson 33 | * @since 4/11/13 5:34 PM 34 | */ 35 | public class StdLoggerFactoryTest { 36 | @Test public void testBasics() { 37 | JSimpleIO.init(); 38 | 39 | LoggerFactory.init(new StdLoggerFactory()); 40 | 41 | Logger logger = LoggerFactory.getLogger("mylogger"); 42 | logger.setLevel(Level.TRACE); 43 | 44 | logger.trace("trace message"); 45 | logger.debug("debug message"); 46 | logger.info("info message"); 47 | logger.warn("warn message"); 48 | logger.error("error message"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-oauth 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-unit 7 | jsimple-util 8 | jsimple-io 9 | jsimple-logging-api 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javabuilder 14 | 15 | 16 | org.eclipse.m2e.core.maven2Builder 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | description = '''JSimple OAuth support, based off of Scribe''' 25 | 26 | dependencies { 27 | compile group: 'com.intellij', name: 'annotations', version: '9.0.4' 28 | compile project(':libraries:jsimple-util') 29 | compile project(':libraries:jsimple-io') 30 | compile project(':libraries:jsimple-logging-api') 31 | testCompile project(':libraries:jsimple-unit') 32 | } 33 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-oauth")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-oauth")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/c#/jsimple-oauth.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /libraries/jsimple-oauth/jsimple-oauth.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /libraries/jsimple-oauth/original-scribe-1.3.1-sources.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juniversal/jsimple/601c9f9cf7a57222c9479954cf8a316c4951972c/libraries/jsimple-oauth/original-scribe-1.3.1-sources.zip -------------------------------------------------------------------------------- /libraries/jsimple-unit/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-unit 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | 7 | 8 | org.eclipse.jdt.core.javabuilder 9 | 10 | 11 | org.eclipse.m2e.core.maven2Builder 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | org.eclipse.m2e.core.maven2Nature 17 | 18 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (c) 2012-2015, Microsoft Mobile 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | * THE SOFTWARE. 22 | */ 23 | 24 | description = '''JSimple unit test support, based off of JUnit''' 25 | 26 | dependencies { 27 | compile group: 'junit', name: 'junit', version:'4.10' 28 | compile group: 'com.intellij', name: 'annotations', version:'9.0.4' 29 | compile project(':libraries:jsimple-util') 30 | } 31 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-unit")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-unit")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b77a58cc-c354-4b89-a510-e87c2776ead4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/c#/jsimple-unit.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True -------------------------------------------------------------------------------- /libraries/jsimple-unit/c#/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/jsimple-unit.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libraries/jsimple-unit/src/test/java/jsimple/unit/UnitTestsTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.unit; 24 | 25 | /** 26 | * Created with IntelliJ IDEA. 27 | * 28 | * @author Bret Johnson 29 | * @since 1/1/13 8:12 PM 30 | */ 31 | public class UnitTestsTest { 32 | } 33 | -------------------------------------------------------------------------------- /libraries/jsimple-util/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /libraries/jsimple-util/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsimple-util 4 | NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 5 | 6 | jsimple-unit 7 | 8 | 9 | 10 | org.eclipse.jdt.core.javabuilder 11 | 12 | 13 | org.eclipse.m2e.core.maven2Builder 14 | 15 | 16 | 17 | org.eclipse.jdt.core.javanature 18 | org.eclipse.m2e.core.maven2Nature 19 | 20 | -------------------------------------------------------------------------------- /libraries/jsimple-util/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding/=UTF-8 4 | -------------------------------------------------------------------------------- /libraries/jsimple-util/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jan 23 13:47:24 EST 2014 2 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | eclipse.preferences.version=1 5 | org.eclipse.jdt.core.compiler.source=1.7 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | -------------------------------------------------------------------------------- /libraries/jsimple-util/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /libraries/jsimple-util/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | description = 24 | '''jsimple-util provides utility claasses for collections (standard Java style), date time conversion (based on 25 | Joda Time), regular expression style matching (functional style), some platform dependent functionality 26 | (SystemUtils class), and more.''' 27 | 28 | dependencies { 29 | compile group: 'com.intellij', name: 'annotations', version:'9.0.4' 30 | 31 | testCompile group: 'junit', name: 'junit', version:'4.10' 32 | testCompile project(':libraries:jsimple-unit') 33 | } 34 | -------------------------------------------------------------------------------- /libraries/jsimple-util/c#-test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("jsimple-util-test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("jsimple-util-test")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("59c2e3aa-d59e-49d8-ba47-d326aef4f233")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libraries/jsimple-util/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("jsimple-util")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("jsimple-util")] 14 | [assembly: AssemblyCopyright("Copyright © 2013")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /libraries/jsimple-util/c#/jsimple-util.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True -------------------------------------------------------------------------------- /libraries/jsimple-util/c#/nontranslated/jsimple/lang/AutoCloseable.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | 25 | namespace jsimple.lang 26 | { 27 | public abstract class AutoCloseable : IDisposable 28 | { 29 | public abstract void close(); 30 | 31 | public void Dispose() 32 | { 33 | close(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /libraries/jsimple-util/c#/nontranslated/jsimple/lang/Iterable.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System.Collections; 24 | using System.Collections.Generic; 25 | using jsimple.util; 26 | 27 | namespace jsimple.lang 28 | { 29 | public abstract class Iterable : IEnumerable 30 | { 31 | public abstract Iterator iterator(); 32 | 33 | IEnumerator IEnumerable.GetEnumerator() 34 | { 35 | return GetEnumerator(); 36 | } 37 | 38 | public IEnumerator GetEnumerator() 39 | { 40 | return iterator(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /libraries/jsimple-util/c#/nontranslated/jsimple/util/Iterator.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2014, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | using System; 24 | using System.Collections; 25 | using System.Collections.Generic; 26 | 27 | namespace jsimple.util 28 | { 29 | public abstract class Iterator : IEnumerator 30 | { 31 | private E currentElmt; 32 | 33 | public E Current { 34 | get { return currentElmt; } 35 | } 36 | 37 | public bool MoveNext() 38 | { 39 | if (! hasNext()) 40 | return false; 41 | else 42 | { 43 | currentElmt = next(); 44 | return true; 45 | } 46 | } 47 | 48 | public void Reset() 49 | { 50 | throw new System.NotImplementedException(); 51 | } 52 | 53 | object IEnumerator.Current 54 | { 55 | get { return currentElmt; } 56 | } 57 | 58 | public void Dispose() 59 | { 60 | } 61 | 62 | public abstract bool hasNext(); 63 | 64 | public abstract E next(); 65 | 66 | public abstract void remove(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /libraries/jsimple-util/jsimple-util.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java-nontranslated/jsimple/lang/AutoCloseable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.lang; 24 | 25 | /** 26 | * Subclasses of AutoCloseable automatically have their close() method called when used in the Java7 try-with-resources 27 | * statement. The C# version of this class implements the IDisposable interface and maps calls to the Dispose method to 28 | * close(). Essentially this class maps to the target language autoclosable-like interface (assuming it has that). 29 | * 30 | * @author Bret Johnson 31 | * @since 4/26/13 11:58 PM 32 | */ 33 | public abstract class AutoCloseable implements java.lang.AutoCloseable { 34 | public abstract void close(); 35 | } 36 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java-nontranslated/jsimple/lang/Iterable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.lang; 24 | 25 | /** 26 | * Created by Bret on 11/28/2014. 27 | */ 28 | public abstract class Iterable implements java.lang.Iterable { 29 | public abstract jsimple.util.Iterator iterator(); 30 | } 31 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java/jsimple/util/Equatable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | import org.jetbrains.annotations.Nullable; 26 | 27 | public interface Equatable { 28 | public boolean equalTo(@Nullable T other); 29 | } 30 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java/jsimple/util/InvalidFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | /** 26 | * This is a generic exception class used to indicate the format of something isn't what it's expected to be. 27 | * 28 | * @author Bret Johnson 29 | * @since 5/5/13 4:48 AM 30 | */ 31 | public class InvalidFormatException extends BasicException { 32 | public InvalidFormatException(String message) { 33 | super(message); 34 | } 35 | 36 | public InvalidFormatException(String message, Object arg1) { 37 | super(message, arg1); 38 | } 39 | 40 | public InvalidFormatException(String message, Object arg1, Object arg2) { 41 | super(message, arg1, arg2); 42 | } 43 | 44 | public InvalidFormatException(String message, Object... args) { 45 | super(message, args); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java/jsimple/util/MatchPattern.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | @FunctionalInterface public interface MatchPattern { 26 | public boolean match(MatchBuilder matchBuilder); 27 | } 28 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java/jsimple/util/OptionalInteger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | /** 26 | * Created by bretjohn on 1/7/2015. 27 | */ 28 | public class OptionalInteger { 29 | boolean hasVal; 30 | int val; 31 | 32 | public OptionalInteger(boolean hasVal, int val) { 33 | this.hasVal = hasVal; 34 | this.val = val; 35 | } 36 | 37 | public boolean hasValue() { 38 | return hasVal; 39 | } 40 | 41 | int value() { 42 | if (! hasVal) 43 | throw new ProgrammerError("Called value on OptionalInteger with no value"); 44 | return val; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/main/java/jsimple/util/function/CharPredicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util.function; 24 | 25 | /** 26 | * Created by bretjohn on 2/16/2015. 27 | */ 28 | public @FunctionalInterface interface CharPredicate { 29 | boolean test(char c); 30 | } 31 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/test/java/jsimple/util/StringsTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | import jsimple.unit.UnitTest; 26 | import org.junit.Test; 27 | 28 | /** 29 | * @author Dorin Suletea 30 | * @since 12/1/2014 31 | */ 32 | public class StringsTest extends UnitTest { 33 | @Test public void testSplit() { 34 | testSplit(new String[] {"a", "b", "c" }, Strings.split("a,b,c", ',')); 35 | testSplit(new String[] {"a", "b,c" }, Strings.split("a,b,c", ',', 2)); 36 | testSplit(new String[] {"a,b,c" }, Strings.split("a,b,c", ',', 1)); 37 | testSplit(new String[] {"a,b,c" }, Strings.split("a,b,c", '-', 0)); 38 | } 39 | 40 | public void testSplit(String[] expected, List result) { 41 | String[] resultArray = new String[result.size()]; 42 | result.toArray(resultArray); 43 | 44 | assertArrayEquals(expected, resultArray); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libraries/jsimple-util/src/test/java/jsimple/util/TextualPathTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package jsimple.util; 24 | 25 | import jsimple.unit.UnitTest; 26 | import org.junit.Test; 27 | 28 | /** 29 | * Created by Bret on 4/19/2014. 30 | */ 31 | public class TextualPathTest extends UnitTest { 32 | 33 | @Test 34 | public void testStartsWith() throws Exception { 35 | assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa"))); 36 | assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "bbb"))); 37 | assertTrue(new TextualPath("aaa", "bbb").startsWith(new TextualPath())); 38 | 39 | assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "ccc"))); 40 | assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("aaa", "bbb", "ccc"))); 41 | assertFalse(new TextualPath("aaa", "bbb").startsWith(new TextualPath("bbb", "bbb", "ccc"))); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /libraries/jsimple.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /libraries/libraries.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/good-friends/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/good-friends/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | special-friends 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/good-friends/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_LongLines 3 | formatter_settings_version=12 4 | -------------------------------------------------------------------------------- /samples/good-friends/c#/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/good-friends/c#/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("good-friends")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("good-friends")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bd5d5387-a307-45db-8cce-b5cee9c288df")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /samples/good-friends/good-friends.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/good-friends/src/main/java/goodfriends/model/ApplicationModelRoot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package goodfriends.model; 24 | 25 | import jsimple.util.ArrayList; 26 | import jsimple.util.List; 27 | 28 | /** 29 | * Application facade. Most of the app's functionality is exposed here 30 | */ 31 | public class ApplicationModelRoot { 32 | private final static ApplicationModelRoot instance = new ApplicationModelRoot(); 33 | 34 | private List specialFriends; 35 | 36 | public static ApplicationModelRoot getInstance() { 37 | return instance; 38 | } 39 | 40 | public ApplicationModelRoot() { 41 | specialFriends = new ArrayList(); 42 | } 43 | 44 | public void addSpecialFriend(FacebookFriend friend) { 45 | if (!specialFriends.contains(friend)) { 46 | specialFriends.add(friend); 47 | } 48 | } 49 | 50 | public void addSpecialFriends(List friends) { 51 | for (FacebookFriend facebookFriend : friends) { 52 | if (!specialFriends.contains(facebookFriend)) { 53 | specialFriends.add(facebookFriend); 54 | } 55 | } 56 | } 57 | 58 | public List getSpecialFriends() { 59 | return specialFriends; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /samples/good-friends/src/main/java/goodfriends/model/FacebookFriend.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | package goodfriends.model; 24 | 25 | public class FacebookFriend { 26 | private String name; 27 | private String pictureUrl; 28 | 29 | public FacebookFriend(String name, String pictureUrl) { 30 | this.name = name; 31 | this.pictureUrl = pictureUrl; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return "[name=" + name + pictureUrl + "]\n"; 37 | } 38 | 39 | public String getPictureUrl() { 40 | return pictureUrl; 41 | } 42 | 43 | public String getName() { 44 | return name; 45 | } 46 | 47 | @Override 48 | public boolean equals(Object arg0) { 49 | if (!(arg0 instanceof FacebookFriend)) { 50 | return false; 51 | } 52 | return ((FacebookFriend) arg0).getName().equals(this.name); 53 | } 54 | 55 | public String toJson(String applicationUserId) { 56 | return "{\"name\":\"" + name + "\",\"picURL\":\"" + pictureUrl + "\",\"myid\":" + applicationUserId + "}"; 57 | } 58 | 59 | public int compareToByName(FacebookFriend arg0) { 60 | return name.compareTo(arg0.name); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /samples/samples.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2015, Microsoft Mobile 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | include 'libraries:jsimple-unit' 24 | include 'libraries:jsimple-util' 25 | include 'libraries:jsimple-io' 26 | include 'libraries:jsimple-json' 27 | include 'libraries:jsimple-oauth' 28 | include 'libraries:jsimple-logging-api' 29 | include 'libraries:jsimple-logging-stdimpl' 30 | 31 | include 'samples:good-friends' 32 | -------------------------------------------------------------------------------- /shared.gradle: -------------------------------------------------------------------------------- 1 | ext.juniversalVersion = '0.8.3' 2 | ext.jsimpleVersion = '0.9.3' 3 | ext.jsimpleNugetVersion = ext.jsimpleVersion 4 | 5 | if (hasProperty("teamcity")) { 6 | ext.buildNumber = teamcity["build.number"] 7 | } else { 8 | ext.buildNumber = '' 9 | } 10 | --------------------------------------------------------------------------------