-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
109a584
commit 8e6eb04
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/main/java/fr/firstmegagame4/env/json/api/resource/ExtendedResourceReader.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,10 @@ | ||
package fr.firstmegagame4.env.json.api.resource; | ||
|
||
import java.io.BufferedReader; | ||
|
||
public interface ExtendedResourceReader { | ||
|
||
ExtendedResource getExtendedResource(); | ||
|
||
BufferedReader asBufferedReader(); | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/fr/firstmegagame4/env/json/impl/resource/ExtendedResourceReaderImpl.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,30 @@ | ||
package fr.firstmegagame4.env.json.impl.resource; | ||
|
||
import fr.firstmegagame4.env.json.api.resource.ExtendedResource; | ||
import fr.firstmegagame4.env.json.api.resource.ExtendedResourceReader; | ||
import org.jetbrains.annotations.ApiStatus; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.Reader; | ||
|
||
@ApiStatus.Internal | ||
public class ExtendedResourceReaderImpl extends BufferedReader implements ExtendedResourceReader { | ||
|
||
private final ExtendedResource extendedResource; | ||
|
||
public ExtendedResourceReaderImpl(ExtendedResource extendedResource, @NotNull Reader in) { | ||
super(in); | ||
this.extendedResource = extendedResource; | ||
} | ||
|
||
@Override | ||
public ExtendedResource getExtendedResource() { | ||
return this.extendedResource; | ||
} | ||
|
||
@Override | ||
public BufferedReader asBufferedReader() { | ||
return this; | ||
} | ||
} |
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