Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
otgc-android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OTGC
otgc-android
Commits
2b12bfe8
Commit
2b12bfe8
authored
Apr 23, 2020
by
Kishen Maloor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix impl of IORepository::getBytesFromFile()
Signed-off-by:
Kishen Maloor
<
kishen.maloor@intel.com
>
parent
d126a828
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
otgc/src/main/java/org/openconnectivity/otgc/data/repository/IORepository.java
...g/openconnectivity/otgc/data/repository/IORepository.java
+3
-1
No files found.
otgc/src/main/java/org/openconnectivity/otgc/data/repository/IORepository.java
View file @
2b12bfe8
...
@@ -168,8 +168,10 @@ public class IORepository {
...
@@ -168,8 +168,10 @@ public class IORepository {
byte
[]
fileBytes
;
byte
[]
fileBytes
;
try
(
InputStream
inputStream
=
try
(
InputStream
inputStream
=
mContext
.
getAssets
().
open
(
path
))
{
mContext
.
getAssets
().
open
(
path
))
{
fileBytes
=
new
byte
[
inputStream
.
available
()];
int
numBytes
=
inputStream
.
available
()
+
1
;
fileBytes
=
new
byte
[
numBytes
];
inputStream
.
read
(
fileBytes
);
inputStream
.
read
(
fileBytes
);
fileBytes
[
numBytes
-
1
]
=
'\0'
;
}
}
return
fileBytes
;
return
fileBytes
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment