You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-java.md
+13-26Lines changed: 13 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ ms.author: routlaw
21
21
22
22
The concepts of [triggers and bindings](functions-triggers-bindings.md) are fundamental to Azure Functions. Triggers start the execution of your code. Bindings give you a way to pass data to and return data from a function, without having to write custom data access code.
23
23
24
-
A function should be a stateless method to process input and produce output. Although you are allowed to write instance methods, your function must not depend on any instance fields of the class. All the function methods should be `public` and method with annotation @FunctionName must be unique as method name defines the entry for a function.
24
+
A function should be a stateless method to process input and produce output. Your function cannot depend on any instance fields of the class. All the function methods should be `public` and method with annotation @FunctionName must be unique as method name defines the entry for a function.
25
25
26
26
## Folder structure
27
27
@@ -110,42 +110,29 @@ The `com.microsoft.azure.functions:azure-functions-java-library` dependency is p
110
110
111
111
## Data type support
112
112
113
-
You can use Plain old Java objects (POJOs), types defined in `azure-functions-java-library` or primitive dataTypes such as String, Integer to bind to input/output bindings. The Azure Functions runtime attempts convert the input received into the type requested by your code.
113
+
You can use Plain old Java objects (POJOs), types defined in `azure-functions-java-library` or primitive dataTypes such as String, Integer to bind to input/output bindings.
114
114
115
115
### Plain old Java objects (POJOs)
116
116
117
117
For converting input data to POJO, [azure-functions-java-worker](https://github.com/Azure/azure-functions-java-worker) uses [gson](https://github.com/google/gson) library. POJO types used as inputs to functions must the same `public` access modifier as the function methods they are being used in.
118
118
119
119
### Binary data
120
120
121
-
Binary data is represented as a `byte[]` in your Azure functions code. Bind binary inputs or outputs to your functions by setting the `dataType` field in your function.json to `binary`:
122
-
123
-
```json
124
-
{
125
-
"scriptFile": "azure-functions-example.jar",
126
-
"entryPoint": "com.example.Function.echo",
127
-
"bindings": [
128
-
{
129
-
"type": "blob",
130
-
"name": "content",
131
-
"direction": "in",
132
-
"dataType": "binary",
133
-
"path": "container/myfile.bin",
134
-
"connection": "ExampleStorageAccount"
135
-
},
136
-
]
137
-
}
138
-
```
139
-
140
-
Then use it in your function code:
121
+
Bind binary inputs or outputs to `byte[]` by setting the `dataType` field in your function.json to `binary`:
0 commit comments