-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7445] Add InputStreamProviderException, add getInputStreamProviderAn…
…dFileType in SplitFactoryImpl and some improvements
- Loading branch information
1 parent
d76fa70
commit cfde3f7
Showing
8 changed files
with
103 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
client/src/main/java/io/split/client/exceptions/InputStreamProviderException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.split.client.exceptions; | ||
|
||
public class InputStreamProviderException extends Exception { | ||
private final String _fileName; | ||
|
||
public InputStreamProviderException(String fileName, String message) { | ||
super(message); | ||
_fileName = fileName; | ||
} | ||
|
||
public String getFileName() { | ||
return _fileName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
client/src/main/java/io/split/client/utils/InputStreamProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package io.split.client.utils; | ||
|
||
import java.io.FileNotFoundException; | ||
import io.split.client.exceptions.InputStreamProviderException; | ||
|
||
import java.io.InputStream; | ||
|
||
public interface InputStreamProvider { | ||
|
||
public InputStream get() throws FileNotFoundException; | ||
InputStream get() throws InputStreamProviderException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
client/src/main/java/io/split/client/utils/LocalhostPair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.split.client.utils; | ||
|
||
public class LocalhostPair { | ||
|
||
private final InputStreamProvider _inputStreamProvider; | ||
private final FileTypeEnum _fileTypeEnum; | ||
|
||
public LocalhostPair(InputStreamProvider inputStreamProvider, FileTypeEnum fileType) { | ||
_inputStreamProvider = inputStreamProvider; | ||
_fileTypeEnum = fileType; | ||
} | ||
|
||
public InputStreamProvider getInputStreamProvider() { | ||
return _inputStreamProvider; | ||
} | ||
|
||
public FileTypeEnum getFileTypeEnum() { | ||
return _fileTypeEnum; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters