Repository navigation
Passio Practice Exercise implemented - #2970
shreyasgosavi wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
This file should just contain enough of the stub for students to start. Have a look at the stub for the Poker for example. It only contains the bare methods for students to fill.
When the student starts the Paasio exercise, the student will start with the contents of this file. They should not start with the solution.
|
Thanks for time and that's really good explanation will do it 🤘 |
|
Heyyy I have made the requested changes could you please verify that |
| @Disabled("Remove to run test") | ||
| void checkByteValueReadFromTheFile() throws IOException { | ||
|
|
||
| byte[] fileData = new byte[100]; |
There was a problem hiding this comment.
I think this fileData name came from an earlier iteration where we had a distinction between file and network data. However, we no longer have this distinction, so I'd suggest renaming it. Perhaps just data?
| @Disabled("Remove to run test") | ||
| void verifyBytesWrittenFromOffsetIntoTheOutputStreamAlongWithTheCount() throws IOException { | ||
|
|
||
| String fileContentToBeWritten = " This is additional Content."; |
There was a problem hiding this comment.
Similar to another comment, this isn't "file" specific, so suggest renaming the variable.
|
@shreyasgosavi Are you still interested in making this happen or should we close this out as abandoned? |
|
Closing this PR due to lack of activity. Happy to re-open would like to continue this one. |
|
Hey Exercism/Java,
Hii, been inactive for a while.. will be taking it up on the addressed
points..
Thanks,
Shreyas Gosavi
…On Sat, 10 Oct, 2026, 1:51 pm Kah Goh, ***@***.***> wrote:
Closed #2970 <#2970>.
—
Reply to this email directly, view it on GitHub
<#2970?email_source=notifications&email_token=AN6CGBNAAAIX5P5UALWIQKT5THWQTA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZGMZDSNJTGU4DPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-32932953587>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN6CGBNVPNUIVHYDBGJMEC35THWQTAVCNFSNUABEKJSXA33TNF2G64TZHMYTOMRXGA2TIMB3JFZXG5LFHMZTEMBUGMYDIMBUGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AN6CGBIT45A3GAVY3RGDP335THWQTA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZGMZDSNJTGU4DPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FKMZXW65DFOJPWS33T>
and Android
<https://github.com/notifications/mobile/android/AN6CGBNPTPGRCOGJEVHPZR35THWQTA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZGMZDSNJTGU4DPJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FOMZXW65DFOJPWC3TEOJXWSZA>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Re-opening for @shreyasgosavi |
|
Thanks !!
…On Sat, 10 Oct, 2026, 4:29 pm Kah Goh, ***@***.***> wrote:
*kahgoh* left a comment (exercism/java#2970)
<#2970 (comment)>
Re-opening for @shreyasgosavi <https://github.com/shreyasgosavi>
—
Reply to this email directly, view it on GitHub
<#2970?email_source=notifications&email_token=AN6CGBIDY5DS2Y7XATPRSRD5TIJCNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBZGY3TSNBVG43KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6096794576>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN6CGBLJFORBWJEYUK4BOPD5TIJCNAVCNFSNUABEKJSXA33TNF2G64TZHMYTOMRXGA2TIMB3JFZXG5LFHMZTEMBUGMYDIMBUGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AN6CGBKJ7Y3XFDIAJGTIJF35TIJCNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBZGY3TSNBVG43KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AN6CGBL6UG3D4ZQ273PUVPD5TIJCNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMBZGY3TSNBVG43KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Hi @shreyasgosavi, are you still working on this one? |
|
Yea. ....
…On Sat, 14 Nov, 2026, 3:58 am Kah Goh, ***@***.***> wrote:
*kahgoh* left a comment (exercism/java#2970)
<#2970 (comment)>
Hi @shreyasgosavi <https://github.com/shreyasgosavi>, are you still
working on this one?
—
Reply to this email directly, view it on GitHub
<#2970?email_source=notifications&email_token=AN6CGBIOY2C7YSFICUC2P735Y6DJ3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOBWGY2DSNBSHA4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6866494288>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN6CGBKGXKY3SMGTOUT33WD5Y6DJ3AVCNFSNUABEKJSXA33TNF2G64TZHMYTOMRXGA2TIMB3JFZXG5LFHMZTEMBUGMYDIMBUGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AN6CGBMQJSBDJG3Y73IEN3T5Y6DJ3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOBWGY2DSNBSHA4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AN6CGBKTMFB4VKRRD4ZD32T5Y6DJ3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOBWGY2DSNBSHA4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@shreyasgosavi Any updates here? Any idea when you can get this done? |
|
Hi, yes i will close this by Monday
…On Sat, 21 Nov, 2026, 10:33 am Isaac Good, ***@***.***> wrote:
*IsaacG* left a comment (exercism/java#2970)
<#2970 (comment)>
@shreyasgosavi <https://github.com/shreyasgosavi> Any updates here? Any
idea when you can get this done?
—
Reply to this email directly, view it on GitHub
<#2970?email_source=notifications&email_token=AN6CGBO5G7JJ2LHTBDWPMDT52EO3HA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBVG43DIOJVG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-7057649579>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN6CGBMWIOPQI4UURPHRCML52EO3HAVCNFSNUABEKJSXA33TNF2G64TZHMYTOMRXGA2TIMB3JFZXG5LFHMZTEMBUGMYDIMBUGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AN6CGBO7LVYNIMRP5QB6MJL52EO3HA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBVG43DIOJVG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AN6CGBNP5ZMRSBUF65A4OKL52EO3HA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBVG43DIOJVG442M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
hey working on the changes |
|
What to do for i18 check? |
You don't have to do anything for that - I'll take care of it later, prior to merging. |
| @@ -0,0 +1,17 @@ | |||
| { | |||
| "authors": [], | |||
There was a problem hiding this comment.
Feel free to add yourself as the author
| public InputStream getInputStream() { | ||
| return inputStream; | ||
| } | ||
|
|
||
| public OutputStream getOutputStream() { | ||
| return outputStream; | ||
| } |
There was a problem hiding this comment.
I think we can remove these getInputStream and getOutputStream methods. They don't seem to be used.
| } | ||
|
|
||
| @Test | ||
| void checkAmountOfDataReadInBytesForMultipleOperations() throws IOException { |
There was a problem hiding this comment.
Missing a @Disabled here.
| void checkAmountOfDataReadInBytesForMultipleOperations() throws IOException { | |
| @Disabled("Remove to run test") | |
| void checkAmountOfDataReadInBytesForMultipleOperations() throws IOException { |
| private long bytesRead; | ||
| private long readOperationCount; | ||
| private long bytesWritten; | ||
| private long writeOperationCount; | ||
|
|
||
| private final InputStream inputStream; | ||
| private final OutputStream outputStream; |
There was a problem hiding this comment.
I think the fields could be removed from the stub. Students can decide which fields are needed.
| private long bytesRead; | |
| private long readOperationCount; | |
| private long bytesWritten; | |
| private long writeOperationCount; | |
| private final InputStream inputStream; | |
| private final OutputStream outputStream; |
| public long getBytesRead() { | ||
| return bytesRead; | ||
| } | ||
|
|
||
| public long getReadOperationCount() { | ||
| return readOperationCount; | ||
| } | ||
|
|
||
| public long getBytesWritten() { | ||
| return bytesWritten; | ||
| } | ||
|
|
||
| public long getWriteOperationCount() { | ||
| return writeOperationCount; | ||
| } |
There was a problem hiding this comment.
These methods should just throw UnsupportedOperationException - let students fill these methods.
| return outputStream; | ||
| } | ||
|
|
||
| public Paasio(InputStream inputStream, OutputStream outputStream) { |
There was a problem hiding this comment.
I just noticed most of the reference solution looks like the methods wrap they around the InputStream and OutputStream methods. I was thinking if we want to give students a bit more to work with, we could pass a byte arrays (byte []) instead (the byte arrays would represent data buffers where data will be read or written to). They would still be able to create InputStream and OutputStream around that, but I think they could also choose to work with the byte[] instead.
Take this as a suggestion though - happy to stick with InputStream and OutputStream approach
There was a problem hiding this comment.
yea had same idea of that earlier, but thought it might complicate (for exercise point-of-view) as there are multiple ways to use single function in IO Streams.
Eg:
read() method has 2 ways of usage -- read one-byte and to read the data into byte-array (public int read() & public int read(byte[] b) ), so thought of going with that approach.
But if you have any other idea, we can go with it ✌️
| String dataInFile = new String(messageArray, 0, initialMessage.length + bytesRead, StandardCharsets.UTF_8); | ||
| assertThat(dataInFile).isEqualTo("Hello! This is data "); |
There was a problem hiding this comment.
Remove inFile reference
| String dataInFile = new String(messageArray, 0, initialMessage.length + bytesRead, StandardCharsets.UTF_8); | |
| assertThat(dataInFile).isEqualTo("Hello! This is data "); | |
| String data = new String(messageArray, 0, initialMessage.length + bytesRead, StandardCharsets.UTF_8); | |
| assertThat(data ).isEqualTo("Hello! This is data "); |
pull request
Hello, raising PR for paasio exercise implementation. Issue ID : #1813
Reviewer Resources:
Track Policies